/// <summary> /// Plays the animation from the start /// </summary> public void Play(AnimFinish onFinish = null) { Reset(); Resume(); OnFinish = onFinish; }
/// <summary> /// Ends the animation /// </summary> public void End() { CurFrameNum = MaxFrameIndex; AnimDone = true; OnFinish?.Invoke(); OnFinish = null; }
/// <summary> /// Resets the animation to the start /// </summary> /// <param name="resetSpeed">If true, resets the Animation's speed to its default value</param> public void Reset(bool resetSpeed = false) { AnimDone = false; CurFrameNum = 0; PausedTime = 0d; ResetFrameDur(); OnFinish = null; //Reset the animation's speed if specified if (resetSpeed == true) { ResetSpeed(); } DerivedReset(); }