Allow to start both on cordova and web
This commit is contained in:
parent
93fedd38cc
commit
1850464154
10
src/main.js
10
src/main.js
|
@ -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() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue