Example #1
0
 public virtual void RemoveMotionInterpolationCurve()
 {
     if (MotionInterpolation.IsKeepTerminalSlope)
     {
         Velocity *= (1.0F - MotionInterpolation.Curve.P2.y) / (1.0F - MotionInterpolation.Curve.P2.x);
     }
     MotionInterpolation = null;
 }
Example #2
0
 public virtual void SetMotionInterpolationCurve(Vector2 pos1, Vector2 pos2, int length, bool isKeepTerminalSlope = true)
 {
     MotionInterpolation = new MotionInterpolation(World.FrameCount, length, pos1, pos2, isKeepTerminalSlope);
 }