Wait for backgrounds to render before starting

This commit is contained in:
LoveEevee 2018-11-23 22:15:10 +03:00
parent 96b8e9f3a2
commit f523700dc4

View File

@ -36,13 +36,15 @@ class Controller{
syncWith.game.startDate = this.game.startDate
this.syncWith = syncWith
}
this.startMainLoop()
if(!this.multiplayer){
debugObj.controller = this
if(debugObj.debug){
debugObj.debug.updateStatus()
requestAnimationFrame(() => {
this.startMainLoop()
if(!this.multiplayer){
debugObj.controller = this
if(debugObj.debug){
debugObj.debug.updateStatus()
}
}
}
})
}
startMainLoop(){
this.mainLoopStarted = false