Actor

An actor has action mapping.

abstract
class Actor : Node {}

Constructors

this
this(string id, Node parent)

Default constructor.

Inherited Members

From Node

transform
Transform transform;

Transform component.

id
string id()

Returns node ID.

parent
Node parent [@property getter]

Returns an array with parent references.

children
Node[string] children [@property getter]

Returns an array with children references.

child
string child [@property setter]

Returns a child reference using its ID.

scene
Scene scene [@property getter]
start
void start()

Called after all objects instantiation. Optional.

update
void update(float deltaTime)

Called every frame. Optional.

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.

Meta