Optional
pos: Vector2Optional
children: GameObject[]Private
#childrenPrivate
#drawPrivate
#inPrivate
#preloadPrivate
#readyPrivate
#updateThe numerical ID of a GameObject
.
Whether or not the velocity is applied every update.
The name of a GameObject
.
The parent of a GameObject
in the scene tree. If the object has no parent or is not in the scene tree, this value is null
The 2D world position of the Object2D
, relative to its parent.
The change in postion when the MovingObject
moves.
Static
cacheA map of GameObject
s and their id
s.
Static
nextThe next id
available for a GameObject
A list of the GameObject
and every descendant of the GameObject
The direct children of this GameObject
in the scene tree.
Set to true when the GameObject
is added.
Whether or not the MovingObject
's collider
is touching another Collider
above it.
Whether or not the MovingObject
's collider
is touching another Collider
below it.
Whether or not the MovingObject
's collider
is touching another Collider
to the left or right of it.
Adds a child GameObject
to this GameObject
.
Gets a child by its id
property.
Gets a child by its index in the array of children.
Gets a child by its name
property.
Adds a function to be called on draw.
Adds a function to be called on preload. If the object is added to the scene after the game loads, it will be called right before the object is added.
Adds a function to be called on ready. If the object is added to the scene after the game loads, it will be called right after the object is added.
Adds a function to be called on update.
Static
getGets a GameObject
from GameObject.cache
by its id
. Returns null
if the object is not found.
Generated using TypeDoc
A
GameObject
with a 2D position.