Esempio n. 1
0
        void resetState()
        {
            context                 = null;
            _completionHandler      = _loopCompleteHandler = null;
            _isTimeScaleIndependent = false;
            _tweenState             = TweenState.Complete;
            _shouldRecycleTween     = true;
            _isRelative             = false;
            _easeType               = ZestKit.defaultEaseType;
            _animationCurve         = null;

            if (_nextTween != null)
            {
                _nextTween.recycleSelf();
                _nextTween = null;
            }

            _delay              = 0f;
            _duration           = 0f;
            _elapsedTime        = 0f;
            _loopType           = LoopType.None;
            _delayBetweenLoops  = 0f;
            _loops              = 0;
            _isRunningInReverse = false;
        }
Esempio n. 2
0
        void resetState()
        {
            context                 = null;
            _completionHandler      = _loopCompleteHandler = null;
            _isFromValueOverridden  = false;
            _isTimeScaleIndependent = false;
            _tweenState             = TweenState.Complete;
            // TODO: I don't think we should ever flip the flag from _shouldRecycleTween = false without the user's consent. Needs research and some thought
            //_shouldRecycleTween = true;
            _isRelative     = false;
            _easeType       = ZestKit.defaultEaseType;
            _animationCurve = null;

            if (_nextTween != null)
            {
                _nextTween.recycleSelf();
                _nextTween = null;
            }

            _delay              = 0f;
            _duration           = 0f;
            _timeScale          = 1f;
            _elapsedTime        = 0f;
            _loopType           = LoopType.None;
            _delayBetweenLoops  = 0f;
            _loops              = 0;
            _isRunningInReverse = false;
        }
Esempio n. 3
0
        /// <summary>
        /// removes a tween from the active tweens list
        /// </summary>
        /// <param name="tween">Tween.</param>
        public void removeTween(ITweenable tween)
        {
            tween.recycleSelf();
            _activeTweens.Remove(tween);

            // make sure it doesn't get updated if we are in the update loop
            if (_isUpdating)
            {
                _removedTweens.Add(tween);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// removes a tween from the active tweens list
 /// </summary>
 /// <param name="tween">Tween.</param>
 public static void removeTween(ITweenable tween)
 {
     if (_instance._isUpdating)
     {
         _instance._tempTweens.add(tween);
     }
     else
     {
         tween.recycleSelf();
         _instance._activeTweens.remove(tween);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// removes a tween from the active tweens list
 /// </summary>
 /// <param name="tween">Tween.</param>
 public void removeTween(ITweenable tween)
 {
     if (_isUpdating)
     {
         _tempTweens.Add(tween);
     }
     else
     {
         tween.recycleSelf();
         _activeTweens.Remove(tween);
     }
 }
Esempio n. 6
0
		/// <summary>
		/// removes a tween from the active tweens list. List.Remove can be quite slow so it is preferable to sue the other
		/// removeTween variant.
		/// </summary>
		/// <param name="tween">Tween.</param>
		public void removeTween( ITweenable tween )
		{
			_activeTweens.Remove( tween );
			tween.recycleSelf();
		}
Esempio n. 7
0
		/// <summary>
		/// removes the tween at index from the active tweens list.
		/// </summary>
		/// <param name="tween">Tween.</param>
		/// <param name="index">Index.</param>
		public void removeTween( ITweenable tween, int index )
		{
			_activeTweens.RemoveAt( index );
			tween.recycleSelf();
		}
Esempio n. 8
0
 /// <summary>
 /// removes the tween at index from the active tweens list.
 /// </summary>
 /// <param name="tween">Tween.</param>
 /// <param name="index">Index.</param>
 public void removeTween(ITweenable tween, int index)
 {
     _activeTweens.RemoveAt(index);
     tween.recycleSelf();
 }
Esempio n. 9
0
 /// <summary>
 /// removes a tween from the active tweens list. List.Remove can be quite slow so it is preferable to sue the other
 /// removeTween variant.
 /// </summary>
 /// <param name="tween">Tween.</param>
 public void removeTween(ITweenable tween)
 {
     _activeTweens.Remove(tween);
     tween.recycleSelf();
 }
Esempio n. 10
0
		/// <summary>
		/// removes a tween from the active tweens list
		/// </summary>
		/// <param name="tween">Tween.</param>
		public static void removeTween( ITweenable tween )
		{
			if( _instance._isUpdating )
			{
				_instance._tempTweens.add( tween );
			}
			else
			{
				tween.recycleSelf();
				_instance._activeTweens.remove( tween );
			}
		}
Esempio n. 11
0
 /// <summary>
 /// removes a tween from the active tweens list. List.Remove can be quite slow so it is preferable to sue the other
 /// removeTween variant.
 /// </summary>
 /// <param name="tween">Tween.</param>
 public static void removeTween(ITweenable tween)
 {
     _instance._activeTweens.Remove(tween);
     tween.recycleSelf();
 }