Constructs new GameObject.
Defines is this game object enabled in game.
Readonly
idThe unique id of this game object.
The name of this game object.
The order in game objects hierarchy.
The tag of this game object.
The Transform - position, width, height and rotation of this game object.
Defines is this game object visible in game.
Invoked at last update in every frame.
Update(event){
this.transform.translate(new JSGL.Vector2(1, 0).multiply(event.deltaTime));
}
Invoked at frame when drawing
OnDraw(event){
event.renderer.drawRectangle(0, 0, 1, 1);
}
Invoked at game object spawn.
Start(event){
console.log('I have been spawned!');
}
Invoked at every frame.
Update(event){
this.transform.translate(new JSGL.Vector2(1, 0).multiply(event.deltaTime));
}
Static
Is
Represents drawable game object