-
Notifications
You must be signed in to change notification settings - Fork 1
Actor
Maks edited this page Feb 16, 2019
·
5 revisions
Gets a component by name, returns nil if not found.
Adds a component of type with the given name and returns it.
Adds a component of type with the given name from a given definition and returns it. Uses a given component definition to create the component. The type of it depends on the component type, but most use a table.
If this actor has a component with the given type name, removes the component from the actor.
Marks the actor for destruction. Note that this actor will only destroyed at the end of this update, and this reference to it will remain valid until then.
Immediately destroys the actor and invalidates this object. Must not be called in callback functions. Just use Actor:destroy
instead.
Properties | Type | Notes |
---|---|---|
name | string | |
isValid | bool | true if this actor is valid (non-destroyed). Read-only |
isDestroyed | bool | true if this actor is not valid or has been marked for destruction with Actor:destroy() . Read-only |