Exit on exit
This commit is contained in:
parent
52ec8dc37e
commit
27157710b4
|
@ -28,7 +28,9 @@ class Game {
|
||||||
if (this.mainScreen.after === AfterMenu.Start) {
|
if (this.mainScreen.after === AfterMenu.Start) {
|
||||||
this.changeScreen(this.scene);
|
this.changeScreen(this.scene);
|
||||||
} else if (this.mainScreen.after === AfterMenu.Exit) {
|
} else if (this.mainScreen.after === AfterMenu.Exit) {
|
||||||
alert("I don't know how to exit");
|
if (navigator.app !== undefined && typeof navigator.app.exitApp === 'function') {
|
||||||
|
navigator.app.exitApp();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<canvas id="canvas"></canvas>
|
<canvas id="canvas"></canvas>
|
||||||
|
<script src="cordova.js"></script>
|
||||||
<script src="js/escalator.js"></script>
|
<script src="js/escalator.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue