Exit on exit

This commit is contained in:
2018-08-22 16:34:14 +02:00
parent 52ec8dc37e
commit 27157710b4
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -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();
}
}
}
}