Add simple tap controls to Bouncy Road

This commit is contained in:
Epicgamer2469 2024-05-16 22:56:14 -05:00
parent e3f62c76e8
commit 362e4c1c2d

View file

@ -142,16 +142,18 @@ namespace HeavenStudio.Games
} }
protected static bool IA_TouchLeft(out double dt) protected static bool IA_TouchLeft(out double dt)
{ {
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Left, out dt); return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt) && instance.IsExpectingInputNow(InputAction_Left);
} }
protected static bool IA_PadRight(out double dt) protected static bool IA_PadRight(out double dt)
{ {
return PlayerInput.GetPadDown(InputController.ActionsPad.East, out dt); return PlayerInput.GetPadDown(InputController.ActionsPad.East, out dt);
} }
protected static bool IA_TouchRight(out double dt) protected static bool IA_TouchRight(out double dt) {
{ return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt)
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Right, out dt); && (instance.IsExpectingInputNow(InputAction_Right)
|| (!instance.IsExpectingInputNow(InputAction_Left) && !instance.IsExpectingInputNow(InputAction_Right)));
} }
public static PlayerInput.InputAction InputAction_Left = public static PlayerInput.InputAction InputAction_Left =