/// <summary>This will submit any previously registered transitions, and reset the timing.</summary>
        public static void Submit()
        {
            currentTiming = LeanTime.Default;
            currentQueue  = null;
            currentSpeed  = 1.0f;

            baseMethodStack.Clear();
        }
        /// <summary>This method will return the specified timing, unless it's set to <b>Default</b>, then it will return <b>UnscaledTime</b>.</summary>
        public static LeanTime GetTiming(LeanTime current = LeanTime.Default)
        {
            if (current == LeanTime.Default)
            {
                current = LeanTime.UnscaledUpdate;
            }

            return(current);
        }
 /// <summary>This will reset any previously called TimeTransition calls.</summary>
 public static void ResetTiming()
 {
     currentTiming = LeanTime.Default;
 }
 /// <summary>This method works like <b>GetTiming</b>, but it won't return any unscaled times.</summary>
 public static LeanTime GetTimingAbs(LeanTime current)
 {
     return((LeanTime)System.Math.Abs((int)current));
 }
Example #5
0
 /// <summary>This allows you to change where in the game loop transitions after this will update.
 /// NOTE: Once you submit the previous transitions, this will be reset to default.</summary>
 public static GameObject TimeTransition(this UnityEngine.GameObject target, LeanTime update)
 {
     LeanTransition.CurrentUpdate = update; return(target);
 }
Example #6
0
 /// <summary>This allows you to change where in the game loop transitions after this will update.
 /// NOTE: Once you submit the previous transitions, this will be reset to default.</summary>
 public static T TimeTransition <T>(this T target, LeanTime update)
     where T : Component
 {
     LeanTransition.CurrentUpdate = update; return(target);
 }