示例#1
0
        /// <summary>
        /// Play forward from position
        /// </summary>
        /// <param name="time">position</param>
        public void PlayForward(float time)
        {
            foreach (var property in tweenProperties)
            {
                property.isPlaying = true;
                property.isReverse = false;
            }

            if (OnForwardAction != null)
            {
                OnForwardAction();
            }

            this.time = time;
            isReverse = false;
            SafeTweenManager.Play(this);
        }
示例#2
0
        /// <summary>
        /// Play backward from position
        /// </summary>
        /// <param name="time">position</param>
        public void PlayBackward(float time)
        {
            foreach (var property in tweenProperties)
            {
                property.isPlaying = true;
                property.isReverse = true;
            }

            if (OnBackwardAction != null)
            {
                OnBackwardAction();
            }

            time      = duration;
            isReverse = true;
            SafeTweenManager.Play(this);
        }
示例#3
0
 /// <summary>
 /// Stop animation at current position
 /// </summary>
 public void Stop()
 {
     SafeTweenManager.Stop(this);
 }