Skip to content

Commit

Permalink
mobile check
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjamuffin99 committed Feb 7, 2024
1 parent a6a674a commit 69e3d6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/MenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ class MenuState extends FlxState {
_title3.alpha += FlxG.elapsed / 2;

if (Controls.kb || Controls.ka) {
if (FlxG.mouse.justPressed && mouseTimer < 4)
return;
if (!FlxG.onMobile && FlxG.mouse.pressed && mouseTimer < 4)
return; // wait a few seconds before accepting mouse input (unless on mobile!)
if (FlxG.onMobile && FlxG.touches.getFirst()?.justPressedPosition.y > FlxG.height - 20)
return;
FlxG.switchState(new PlayState());
Expand Down

0 comments on commit 69e3d6f

Please sign in to comment.