Esempio n. 1
0
        public float GetValueAngular()
        {
            double timeRatio;
            var    diff = EndTime - StartTime;

            if (diff < 0.000001)
            {
                timeRatio = 1.0;
            }
            else
            {
                timeRatio = (Engine.Time - StartTime) / diff;
            }
            return(TweenMath.EvalAngular(A1, A2, (float)timeRatio, Tween));
        }
Esempio n. 2
0
        public Tuple <float, float> GetValue()
        {
            double timeRatio;
            var    diff = EndTime - StartTime;

            if (diff < 0.000001)
            {
                timeRatio = 1.0;
            }
            else
            {
                timeRatio = (Engine.Time - StartTime) / diff;
            }
            return(new Tuple <float, float>(
                       TweenMath.Eval(A1, A2, (float)timeRatio, Tween),
                       TweenMath.Eval(B1, B2, (float)timeRatio, Tween)
                       ));
        }
Esempio n. 3
0
        public Vector3 GetValueVector()
        {
            double timeRatio;
            var    diff = EndTime - StartTime;

            if (diff < 0.000001)
            {
                timeRatio = 1.0;
            }
            else
            {
                timeRatio = (Engine.Time - StartTime) / diff;
            }
            return(new Vector3(
                       TweenMath.Eval(A1, A2, (float)timeRatio, Tween),
                       TweenMath.Eval(B1, B2, (float)timeRatio, Tween),
                       TweenMath.Eval(C1, C2, (float)timeRatio, Tween)
                       ));
        }