Example #1
0
        /// <summary>
        /// Stops all playing animation clips that were started with this UiAnimation.
        /// </summary>
        public void Stop(bool gotoLastFrame = true)
        {
            if (!IsPlaying || _activeAnimation == null)
            {
                return;
            }

            if (gotoLastFrame)
            {
                _activeAnimation.RewindToEnd();
            }

            OnComplete.InvokeIfNotNull(_activeAnimation);

            IsPlaying = false;
            Time      = 0;

            _activeAnimation = null;
        }