Events

@:dox(show)_undo():Void

@:dox(show)_redo():Void

Constructor

new()

Variables

@:value(-1)maxSteps:Int = -1

If provided, number of available steps will be limited to this value, meaning older steps will be removed and not recoverable if reaching the limit. Default is: store as many steps as possible, no limit (except available memory?)

@:value(null)read onlyinitializerName:String = null

Methods

clearPreviousStepsOutsideLimit(maxSteps:Int):Void

Manually clear previous steps outside the given limit

Parameters:

null

maxSteps

step():Void

Record a step in the undo stack

undo():Void

Undo last step, if any

redo():Void

Redo last undone step, if any

Inherited Events

Defined by Entity

@:dox(show)dispose(entity:Entity):Void

@:dox(show)destroy(entity:Entity):Void

Inherited Variables

Defined by Entity

read onlyhasData:Bool

@:value(null)id:String = null

read onlydestroyed:Bool

read onlydisposed:Bool

@:value(null)read onlyautoruns:Array<Autorun> = null

@editablecomponents:ReadOnlyMap<String, Component>

Public components mapping. Contain components created separately with component() or macro-based components as well.

scriptContent:ScriptContent

Available with script plugin

script:Script

Available with script plugin

Inherited Methods

Defined by Entity

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.

dispose():Void

Schedules destroy, at the end of the current frame.

unbindEvents():Void

Remove all events handlers from this entity.

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

tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

component<C>(?name:String, ?component:Null<C>):C