Optional
pos: Vector2Optional
children: GameObject[]Private
#childrenPrivate
#drawPrivate
#inPrivate
#preloadPrivate
#readyPrivate
#updateThe numerical ID of a GameObject
.
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 AABB for the Collider
to check collisions in. Position is the offset from the globalPos
of the SpriteObject
.
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.
Returns the MaximumDistanceInfo
for this collider, based on every Collider
in the scene tree.
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 preload. If the object is added to the scene after the game loads, it will be called right before the object is added.
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.