Ejemplo n.º 1
0
        /// <summary>Plays the tween</summary>
        public static T Play <T>(this T t) where T : Tween
        {
            if (t == null)
            {
                if (Debugger.logPriority > 1)
                {
                    Debugger.LogNullTween(t);
                }
                return(t);
            }
            else if (!t.active)
            {
                if (Debugger.logPriority > 1)
                {
                    Debugger.LogInvalidTween(t);
                }
                return(t);
            }
            else if (t.isSequenced)
            {
                if (Debugger.logPriority > 1)
                {
                    Debugger.LogInvalidTween(t);
                }
                return(t);
            }

            TweenManager.Play(t);
            return(t);
        }
Ejemplo n.º 2
0
        } //END Stop

        //--------------------------------------------//
        /// <summary>
        /// Plays any existing tweens that are modifying this component or object
        /// </summary>
        /// <typeparam name="T">Component/Object type</typeparam>
        /// <param name="playThis">Component or object to play any existing tweens</param>
        public static void Play<T>( this T playThis )
        //--------------------------------------------//
        {

            TweenManager.Play( playThis );

        } //END Play
Ejemplo n.º 3
0
 public static T Play <T>(this T t) where T : Tween
 {
     if (t == null)
     {
         if (Debugger.logPriority > 1)
         {
             Debugger.LogNullTween((Tween)(object)t);
         }
         return(t);
     }
     if (!((Tween)(object)t).active)
     {
         if (Debugger.logPriority > 1)
         {
             Debugger.LogInvalidTween((Tween)(object)t);
         }
         return(t);
     }
     if (((Tween)(object)t).isSequenced)
     {
         if (Debugger.logPriority > 1)
         {
             Debugger.LogNestedTween((Tween)(object)t);
         }
         return(t);
     }
     TweenManager.Play((Tween)(object)t);
     return(t);
 }
Ejemplo n.º 4
0
 public void Blink(bool enabled = true)
 {
     if (enabled)
     {
         tm.Play("blink");
     }
     else
     {
         tm.StopAll();
     }
 }
Ejemplo n.º 5
0
 public void Appear()
 {
     col.enabled = true;
     tm.Play("appear");
     SoundManager.instance.Play("portal");
 }