Пример #1
0
        /// <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();
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
 /// <summary>This will reset any previously called TimeTransition calls.</summary>
 public static void ResetTiming()
 {
     currentTiming = LeanTime.Default;
 }
Пример #4
0
 /// <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));
 }
Пример #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);
 }
Пример #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);
 }