|
|
@ -17,7 +17,6 @@ namespace Jumpy { |
|
|
|
private const int moveSpeed = 200; |
|
|
|
private const int jumpSpeed = 600; |
|
|
|
private const int gravity = 2000; |
|
|
|
private const int groundLevel = 10000; |
|
|
|
|
|
|
|
private Point position = new Point(Camera.Width / 2, 10); |
|
|
|
private Facing facing = Facing.Right; |
|
|
@ -130,11 +129,6 @@ namespace Jumpy { |
|
|
|
if (airState == AirState.Jumping || airState == AirState.Falling) { |
|
|
|
position.Y += (int) (ySpeed * time.ElapsedGameTime.TotalSeconds); |
|
|
|
ySpeed += gravity * (float) time.ElapsedGameTime.TotalSeconds; |
|
|
|
if (position.Y > groundLevel) { |
|
|
|
position.Y = groundLevel; |
|
|
|
ySpeed = 0; |
|
|
|
airState = AirState.Ground; |
|
|
|
} |
|
|
|
} |
|
|
|
if (airState == AirState.Jumping && pose != Pose.SwordSwing) { |
|
|
|
pose = Pose.Jumping; |
|
|
|