[ view source ]
class LongPress
package ceramic
extends Entity
implements Component
@:build(ceramic.macros.ComponentMacro.build())@:autoBuild(ceramic.macros.ComponentMacro.build())@:build(ceramic.macros.EntityMacro.buildForCompletion())@:autoBuild(ceramic.macros.EntityMacro.buildForCompletion())@:build(tracker.macros.EventsMacro.build())@:autoBuild(tracker.macros.EventsMacro.build())Available on all targets
Events
Constructor
Variables
@:value(null)read onlyinitializerName:String = null
Methods
Inherited Events
Inherited Variables
Defined by Entity
components:ReadOnlyMap<String, Component>
Public components mapping. Contain components
created separately with component()
or macro-based components as well.
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.
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
Start a tween associated with this entity.
Parameters:
easing | The easing to use |
---|---|
duration | The duration of the tween |
fromValue | The start value of the tween |
toValue | The end value of the tween |
update | An update function called at each iteration of the tween |
Returns:
The instance of the created Tween
object
eagerTween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween
Start an eager tween associated with this entity. This is the same as a regular tween, except that it will start updating itself using current frame's delta time instead of next frame like in a regular tween.
Parameters:
easing | The easing to use |
---|---|
duration | The duration of the tween |
fromValue | The start value of the tween |
toValue | The end value of the tween |
update | An update function called at each iteration of the tween |
Returns:
The instance of the created Tween
object