Exit on exit
This commit is contained in:
parent
52ec8dc37e
commit
27157710b4
|
@ -28,7 +28,9 @@ class Game {
|
|||
if (this.mainScreen.after === AfterMenu.Start) {
|
||||
this.changeScreen(this.scene);
|
||||
} 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>
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<script src="cordova.js"></script>
|
||||
<script src="js/escalator.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue