Exemple #1
0
 public static Tween <T> StartNow <T> (
     T from, T to, float seconds, float?delay = null,
     long?now        = null, BoundInterpolator <T, Tween <T> > interpolator = null,
     int repeatCount = 0, TweenRepeatMode repeatMode = TweenRepeatMode.Loop
     )
     where T : struct
 {
     return(StartNow(
                from, to,
                ticks: TimeSpan.FromSeconds(seconds).Ticks,
                delay: TimeSpan.FromSeconds(delay.GetValueOrDefault(0)).Ticks,
                now: now, interpolator: interpolator, repeatCount: repeatCount,
                repeatMode: repeatMode
                ));
 }
Exemple #2
0
        public static Tween <T> StartNow <T> (
            T from, T to, long ticks, long?delay = null,
            long?now        = null, BoundInterpolator <T, Tween <T> > interpolator = null,
            int repeatCount = 0, TweenRepeatMode repeatMode = TweenRepeatMode.Loop
            )
            where T : struct
        {
            var _now = now.HasValue ? now.Value : Time.Ticks;

            return(new Tween <T>(
                       from, to,
                       _now + delay.GetValueOrDefault(0),
                       _now + delay.GetValueOrDefault(0) + ticks,
                       interpolator: interpolator, repeatCount: repeatCount,
                       repeatMode: repeatMode
                       ));
        }
Exemple #3
0
 static Orb()
 {
     Interpolator       = Interpolators <Vector2> .Cosine;
     InterpolatorSource = _InterpolatorSource;
 }
Exemple #4
0
 static Orb () {
     Interpolator = Interpolators<Vector2>.Cosine;
     InterpolatorSource = _InterpolatorSource;
 }