slight tweak to sword-swinging code
GitOrigin-RevId: 042df7ea95bf77f029107c1a9363f3e1343bb928
This commit is contained in:
parent
6766e5ecf3
commit
576ac65eb7
@ -38,6 +38,7 @@ namespace Jumpy {
|
|||||||
ySpeed = -jumpSpeed;
|
ySpeed = -jumpSpeed;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// TODO: only swing the sword if button newly pressed (no turbosword)
|
||||||
if (gamePad.Buttons.X == ButtonState.Pressed && swordSwingTime <= 0) {
|
if (gamePad.Buttons.X == ButtonState.Pressed && swordSwingTime <= 0) {
|
||||||
pose = Pose.SwordSwing;
|
pose = Pose.SwordSwing;
|
||||||
swordSwingTime = 0.3;
|
swordSwingTime = 0.3;
|
||||||
@ -106,11 +107,11 @@ namespace Jumpy {
|
|||||||
}
|
}
|
||||||
case Pose.SwordSwing:
|
case Pose.SwordSwing:
|
||||||
if (swordSwingTime > 0.2) {
|
if (swordSwingTime > 0.2) {
|
||||||
return new Point(spriteSize * 3, 0);
|
return new Point(spriteSize * 3, spriteSize * 0);
|
||||||
} else if (swordSwingTime > 0.1) {
|
} else if (swordSwingTime > 0.1) {
|
||||||
return new Point(spriteSize * 4, 0);
|
return new Point(spriteSize * 4, spriteSize * 0);
|
||||||
} else {
|
} else {
|
||||||
return new Point(spriteSize * 5, 0);
|
return new Point(spriteSize * 5, spriteSize * 0);
|
||||||
}
|
}
|
||||||
case Pose.Standing:
|
case Pose.Standing:
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user