Animation class
Animation is a set of action to execute onBegin, onTick, onEnd.
It can be used to playe some action based on time :
- animate visual Entity (eg: onTick rotate an 3D object)
- countdown to trigger some action onEnd, or update value onTick
- run periodic action on the idem (without using a dedicated
EntitySystem
)
class Animation { /// set by System_Animator when it start playing double _t0 = -1.0; /// Callback before first call of [onTick] (same tick) OnStart onBegin = onNoop; /// Callback each tick of the [System_Animator], /// the animation is ended when onUpdate return false OnUpdate onTick = onNoop; /// Callback when animation is ended (after last [onTick], same tick) OnComplete onEnd = onNoop; /// [Animation] to chain (to animate when this is completed) Animation next = null; }
Properties
OnComplete onEnd #
Callback when animation is ended (after last onTick, same tick)
OnComplete onEnd = onNoop
OnUpdate onTick #
Callback each tick of the System_Animator, the animation is ended when onUpdate return false
OnUpdate onTick = onNoop