remove now-unneeded groundLevel constant
GitOrigin-RevId: 91e2c3320a6ff56938c6c05757a5e035993721ba
This commit is contained in:
parent
11ea98345d
commit
e7006525be
@ -17,7 +17,6 @@ namespace Jumpy {
|
|||||||
private const int moveSpeed = 200;
|
private const int moveSpeed = 200;
|
||||||
private const int jumpSpeed = 600;
|
private const int jumpSpeed = 600;
|
||||||
private const int gravity = 2000;
|
private const int gravity = 2000;
|
||||||
private const int groundLevel = 10000;
|
|
||||||
|
|
||||||
private Point position = new Point(Camera.Width / 2, 10);
|
private Point position = new Point(Camera.Width / 2, 10);
|
||||||
private Facing facing = Facing.Right;
|
private Facing facing = Facing.Right;
|
||||||
@ -130,11 +129,6 @@ namespace Jumpy {
|
|||||||
if (airState == AirState.Jumping || airState == AirState.Falling) {
|
if (airState == AirState.Jumping || airState == AirState.Falling) {
|
||||||
position.Y += (int) (ySpeed * time.ElapsedGameTime.TotalSeconds);
|
position.Y += (int) (ySpeed * time.ElapsedGameTime.TotalSeconds);
|
||||||
ySpeed += gravity * (float) 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) {
|
if (airState == AirState.Jumping && pose != Pose.SwordSwing) {
|
||||||
pose = Pose.Jumping;
|
pose = Pose.Jumping;
|
||||||
|
Loading…
Reference in New Issue
Block a user