reload page to restart the game
This commit is contained in:
+7
-2
@@ -50,8 +50,13 @@ class Start {
|
|||||||
|
|
||||||
// Listen on history back
|
// Listen on history back
|
||||||
window.addEventListener('pageshow', function (event) {
|
window.addEventListener('pageshow', function (event) {
|
||||||
// Launch game
|
if (window.app) {
|
||||||
if (!window.app || !window.app.running) {
|
// Reload page to restart the game
|
||||||
|
if (!window.app.running) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Launch game
|
||||||
new Start().launch("canvas-container");
|
new Start().launch("canvas-container");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user