From 362e4c1c2d326de08348764d4ad907a7d5e605ed Mon Sep 17 00:00:00 2001 From: Epicgamer2469 Date: Thu, 16 May 2024 22:56:14 -0500 Subject: [PATCH] Add simple tap controls to Bouncy Road --- Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs b/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs index cdc7f0ac1..c7804f59f 100644 --- a/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs +++ b/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs @@ -142,16 +142,18 @@ namespace HeavenStudio.Games } 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) { return PlayerInput.GetPadDown(InputController.ActionsPad.East, out dt); } - protected static bool IA_TouchRight(out double dt) - { - return PlayerInput.GetTouchDown(InputController.ActionsTouch.Right, out dt); + protected static bool IA_TouchRight(out double dt) { + return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt) + && (instance.IsExpectingInputNow(InputAction_Right) + || (!instance.IsExpectingInputNow(InputAction_Left) && !instance.IsExpectingInputNow(InputAction_Right))); + } public static PlayerInput.InputAction InputAction_Left =