Add simple tap controls to Bouncy Road
This commit is contained in:
parent
e3f62c76e8
commit
362e4c1c2d
|
@ -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 =
|
||||||
|
|
Loading…
Reference in a new issue