Ejemplo n.º 1
0
 public LerpCoroutine(MonoBehaviour behaviour, float duration, ILerp <T> lerper, Easing.Functions function, Action <T> action) : base(behaviour)
 {
     this.duration = duration > 0F ? duration : Mathf.Epsilon;
     this.action   = (t) =>
     {
         InterpolatedValue = lerper.Lerp(t, Easing.Get(function));
         action(InterpolatedValue);
     };
 }
Ejemplo n.º 2
0
 public LerpCoroutine(float duration, ILerp <T> lerper, Func <float, float> function, Action <T> action) : base()
 {
     this.duration = duration > 0F ? duration : Mathf.Epsilon;
     this.action   = (t) =>
     {
         InterpolatedValue = lerper.Lerp(t, function);
         action(InterpolatedValue);
     };
 }
Ejemplo n.º 3
0
        public void SetUp()
        {
            ILevel     level     = Substitute.For <ILevel>();
            ILerp      lerp      = Substitute.For <ILerp>();
            ILerp      hoistLerp = Substitute.For <ILerp>();
            IAnimator  animator  = Substitute.For <IAnimator>();
            GameObject player    = getPlayer();

            tc = player.GetComponent <ThunderboltCharacter>();
            tc.Awake();
            tc.level     = level;
            tc.lerp      = lerp;
            tc.hoistLerp = hoistLerp;
            tc.animator  = animator;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Linearly interpolates a range by t.
 /// </summary>
 public static T Lerp <T>(ILerp <T> range, float t)
 {
     return(range.Lerp(t));
 }
Ejemplo n.º 5
0
 public Engine(ILerp lerp, IThreshold threshold)
 {
     Lerp      = lerp;
     Threshold = threshold;
 }
Ejemplo n.º 6
0
 public Engine(ILerp lerp, IThreshold threshold)
 {
     Lerp = lerp;
     Threshold = threshold;
 }
Ejemplo n.º 7
0
 /// <summary>
 ///
 /// </summary>
 public static T Lerp <T>(ILerp <T> value)
 {
     return(value.Lerp(Value));
 }