Allow to start both on cordova and web

This commit is contained in:
2018-08-23 10:20:21 +02:00
parent 93fedd38cc
commit 1850464154
+7 -3
View File
@@ -1,15 +1,19 @@
let game, context;
document.addEventListener("deviceready", () => {
if (window.cordova) {
document.addEventListener("deviceready", start, false);
} else {
start();
}
function start() {
if (typeof StatusBar !== 'undefined') {
StatusBar.hide();
}
init();
loop();
}, false);
}
function init() {