|
|
@ -37,12 +37,14 @@ namespace Jumpy { |
|
|
|
ySpeed = -jumpSpeed; |
|
|
|
return; |
|
|
|
} |
|
|
|
// TODO: only swing the sword if button newly pressed (no turbosword)
|
|
|
|
if (gamePad[0].IsButtonDown(Buttons.X) && swordSwingTime <= 0) { |
|
|
|
|
|
|
|
if (gamePad[0].IsButtonDown(Buttons.X) && gamePad[1].IsButtonUp(Buttons.X) |
|
|
|
&& swordSwingTime <= 0) { |
|
|
|
pose = Pose.SwordSwing; |
|
|
|
swordSwingTime = 0.3; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
Vector2 leftStick = gamePad[0].ThumbSticks.Left; |
|
|
|
if (gamePad[0].IsButtonDown(Buttons.DPadLeft) || leftStick.X < -0.5) { |
|
|
|
facing = Facing.Left; |
|
|
|