Exemple #1
0
        /// <summary>
        /// Chain a function to be called and tween to be played when this one is done
        /// </summary>
        public virtual TweenBase Chain(TweenBase tween, System.Action initFunction)
        {
            if (tween == null)
            {
                throw new System.ArgumentNullException("tween");
            }

            var completedCallback = this.TweenCompleted;

            this.TweenCompleted = (sender) =>
            {
                if (completedCallback != null)
                {
                    completedCallback(sender);
                }

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

                tween.Play();
            };

            return(tween);
        }
Exemple #2
0
		/// <summary>
		/// Chain a function to be called and tween to be played when this one is done
		/// </summary>
		public virtual TweenBase Chain( TweenBase tween, System.Action initFunction )
		{

			if( tween == null )
				throw new System.ArgumentNullException( "tween" );

			var completedCallback = this.TweenCompleted;
			this.TweenCompleted = ( sender ) =>
			{

				if( completedCallback != null )
				{
					completedCallback( sender );
				}

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

				tween.Play();

			};

			return tween;

		}
Exemple #3
0
 /// <summary>
 /// Chain a tween to be played when this one is done
 /// </summary>
 public virtual TweenBase Chain(TweenBase tween)
 {
     return(Chain(tween, null));
 }
Exemple #4
0
		/// <summary>
		/// Chain a tween to be played when this one is done
		/// </summary>
		public virtual TweenBase Chain( TweenBase tween )
		{
			return Chain( tween, null );
		}