Exemplo n.º 1
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 LeanTiming GetTiming(LeanTiming current = LeanTiming.Default)
        {
            if (current == LeanTiming.Default)
            {
                current = LeanTiming.UnscaledUpdate;
            }

            return(current);
        }
Exemplo n.º 2
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 GameObject target, LeanTiming update)
 {
     LeanTransition.CurrentTiming = update; return(target);
 }
Exemplo n.º 3
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, LeanTiming update)
     where T : Component
 {
     LeanTransition.CurrentTiming = update; return(target);
 }
Exemplo n.º 4
0
 /// <summary>This will reset any previously called <b>CurrentTiming</b> calls.</summary>
 public static void ResetTiming()
 {
     currentTiming = CurrentDefaultTiming;
 }
Exemplo n.º 5
0
 /// <summary>This method works like <b>GetTiming</b>, but it won't return any unscaled times.</summary>
 public static LeanTiming GetTimingAbs(LeanTiming current)
 {
     return((LeanTiming)System.Math.Abs((int)current));
 }