Node

Represents an object in the scene tree.

Constructors

this
this(string id, Node parent)

Default constructor.

Members

Functions

id
string id()

Returns node ID.

process
void process()

Called every physics tick. Optional.

remove
void remove(T child)

Remove a child node using its reference.

remove
void remove(string id)

Remove a child node using its id.

spawn
T spawn(T node, string id, bool start)

Spawn an object using its reference. You can specify where to spawn. By default is set to scene tree. Returns new nodes reference.

spawn
T spawn(string id, bool start)

Spawn an object using its ID. Second time you call this method for the same id, an assertion is produced. Returns new node reference.

spawnOnce
T spawnOnce(T node, string id, bool start)

Spawn an object using its reference. Second time you call this method for the same id, nothing happens. Returns old/new node reference.

spawnOnce
T spawnOnce(string id, bool start)

Spawn an object using its ID only once. Second time you call this method for the same id, nothing happens. Returns old/new node reference.

start
void start()

Called after all objects instantiation. Optional.

update
void update(float deltaTime)

Called every frame. Optional.

Properties

child
string child [@property setter]

Returns a child reference using its ID.

children
Node[string] children [@property getter]

Returns an array with children references.

parent
Node parent [@property getter]

Returns an array with parent references.

scene
Scene scene [@property getter]

Variables

transform
Transform transform;

Transform component.

Inherited Members

From Startable

start
void start()

From Updatable

update
void update(float deltaTime)

From Processable

process
void process()

Meta