mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-05-09 19:11:39 +00:00
Fix gamepad start not working in js
This commit is contained in:
parent
5eb8e39b82
commit
14b941f65c
1 changed files with 1 additions and 9 deletions
|
|
@ -183,18 +183,10 @@ class MarbleGame {
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
world.update(dt * Debug.timeScale);
|
world.update(dt * Debug.timeScale);
|
||||||
}
|
}
|
||||||
if ((Key.isPressed(Key.ESCAPE) || Gamepad.isPressed(["start"]))
|
if (((Key.isPressed(Key.ESCAPE) #if js && paused #end) || Gamepad.isPressed(["start"]))
|
||||||
&& world.finishTime == null && world._ready) {
|
&& world.finishTime == null && world._ready) {
|
||||||
#if hl
|
|
||||||
paused = !paused;
|
paused = !paused;
|
||||||
handlePauseGame();
|
handlePauseGame();
|
||||||
#end
|
|
||||||
#if js
|
|
||||||
if (paused) {
|
|
||||||
paused = false;
|
|
||||||
}
|
|
||||||
handlePauseGame();
|
|
||||||
#end
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (canvas != null) {
|
if (canvas != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue