Example #1
0
        public override Vector2 GetValue(float t)
        {
            Vector2 v;

            v.x = FEasing.Tween(_from.x, _to.x, t, _easingType);
            v.y = FEasing.Tween(_from.y, _to.y, t, _easingType);
            return(v);
        }
Example #2
0
        public override Quaternion GetValue(float t)
        {
            Quaternion q;

            q.x = FEasing.Tween(_from.x, _to.x, t, _easingType);
            q.y = FEasing.Tween(_from.y, _to.y, t, _easingType);
            q.z = FEasing.Tween(_from.z, _to.z, t, _easingType);
            q.w = FEasing.Tween(_from.w, _to.w, t, _easingType);
            return(q);
        }
Example #3
0
        public override Vector4 GetValue(float t)
        {
            Vector4 v;

            v.x = FEasing.Tween(_from.x, _to.x, t, _easingType);
            v.y = FEasing.Tween(_from.y, _to.y, t, _easingType);
            v.z = FEasing.Tween(_from.z, _to.z, t, _easingType);
            v.w = FEasing.Tween(_from.w, _to.w, t, _easingType);
            return(v);
        }
Example #4
0
        public override Color GetValue(float t)
        {
            Color color;

            color.r = FEasing.Tween(_from.r, _to.r, t, _easingType);
            color.g = FEasing.Tween(_from.g, _to.g, t, _easingType);
            color.b = FEasing.Tween(_from.b, _to.b, t, _easingType);
            color.a = FEasing.Tween(_from.a, _to.a, t, _easingType);

            return(color);
        }
Example #5
0
 private void LookAtTarget(float t)
 {
     if (_isInstant)
     {
         Owner.LookAt(_target);
     }
     else
     {
         Quaternion r = Quaternion.LookRotation(_target.position - Owner.position, Vector3.up);
         Owner.rotation = Quaternion.Lerp(_startRotation, r, FEasing.Tween(0f, 1f, t, _easingType));
     }
 }
Example #6
0
 public override float GetValue(float t)
 {
     return(FEasing.Tween(_from, _to, t, _easingType));
 }