Esempio n. 1
0
		public TweenChain appendTween( ITweenable tween )
		{
			// make sure we have a legit ITweenable
			if( tween is ITweenable )
			{
				tween.resume();
				_tweenList.Add( tween as ITweenable );
			}
			else
			{
				Debug.LogError( "attempted to add a tween that does not implement ITweenable to a TweenChain!" );
			}

			return this;
		}
Esempio n. 2
0
 public void reset() {
     m_target = null;
     m_reverse = false;
     m_interpolation = null;
     restart();
 }
Esempio n. 3
0
 public TweenAction setTarget(ITweenable target) {
     this.m_target = target;
     return this;
 }
Esempio n. 4
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. 5
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. 6
0
		/// <summary>
		/// adds a tween to the active tweens list
		/// </summary>
		/// <param name="tween">Tween.</param>
		public void addTween( ITweenable tween )
		{
			_activeTweens.Add( tween );
		}
Esempio n. 7
0
            internal void reset()
            {
                // any pointers or values that are not guaranteed to be set later are defaulted here
                transform = null;
                rectTransform = null;
                targetVector = _startVector = _diffVector = Vector3.zero;
                delay = delayBetweenLoops = 0f;
                isTimeScaleIndependent = isRunningInReverse = isPaused = false;
                loopType = LoopType.None;
                easeType = GoKitLite.defaultEaseType;
                animCurve = null;
                isRelativeTween = false;
                onComplete = onLoopComplete = null;
                customAction = null;
                propertyTween = null;
                _material = null;
                materialProperty = null;

                if( nextTween != null )
                {
                    // null out and return to the stack all additional tweens
                    GoKitLite.instance._inactiveTweenStack.Push( nextTween );
                    nextTween.reset();
                }

                nextTween = null;
            }
Esempio n. 8
0
            /// <summary>
            /// adds a property tween that will start as soon as the current tween completes
            /// </summary>
            public Tween next( float duration, ITweenable newPropertyTween )
            {
                var tween = GoKitLite.instance.nextAvailableTween( transform, duration, TweenType.Property );
                tween.easeType = easeType;
                tween.propertyTween = newPropertyTween;

                nextTween = tween;

                return tween;
            }
Esempio n. 9
0
        public Tween propertyTween( ITweenable propertyTween, float duration )
        {
            var tween = nextAvailableTween( this.transform, duration, TweenType.Property );
            tween.propertyTween = propertyTween;

            tween.prepareForUse();
            _activeTweens.Add( tween );

            return tween;
        }
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>
		/// adds a tween to the active tweens list
		/// </summary>
		/// <param name="tween">Tween.</param>
		public static void addTween( ITweenable tween )
		{
			_instance._activeTweens.add( tween );
		}