[ view source ]
class Entity
package ceramic
implements Lazy, Events
extended by App, Asset, Assets, Audio, AudioMixer, AutoTiler, BackgroundQueue, BitmapFont, Camera, Click, DoubleClick, EditText, FileWatcher, GifCapture, Group, Input, KeyBinding, KeyBindings, LongPress, ParticleEmitter, Renderer, Screen, Script, SelectText, Shader, Sound, SpineData, SpineMontage, State, StateMachineBase, System, Systems, Task, Texture, TextureAtlas, TextureAtlasPacker, TextureTilePacker, TilemapEditor, Timeline, TimelineTrack, Timelines, Tween, VisibleBounds, Visual, VisualArcadePhysics, VisualNapePhysics, VisualTransition, WatchDirectory, Context, DragDrop, ItalicText, TabFocus, Autorun, DynamicEvents, History, Model, SerializeModel, Project
Available on all targets
Events
Constructor
Variables
components:ReadOnlyMap<String, Component>
Public components mapping. Contain components
created separately with component()
or macro-based components as well.
Methods
destroy():Void
Destroy this entity. This method is automatically protected from duplicate calls. That means
calling multiple times an entity's destroy()
method will run the destroy code only one time.
As soon as destroy()
is called, the entity is marked destroyed=true
, even when calling destroy()
method on a subclass (a macro is inserting a code to mark the object
as destroyed at the beginning of every destroy()
override function.
autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun
Creates a new Autorun
instance with the given callback associated with the current entity.
Parameters:
run | The run callback |
---|
Returns:
The autorun instance