Commit f523700d authored by LoveEevee's avatar LoveEevee

Wait for backgrounds to render before starting

parent 96b8e9f3
...@@ -36,13 +36,15 @@ class Controller{ ...@@ -36,13 +36,15 @@ class Controller{
syncWith.game.startDate = this.game.startDate syncWith.game.startDate = this.game.startDate
this.syncWith = syncWith this.syncWith = syncWith
} }
this.startMainLoop() requestAnimationFrame(() => {
if(!this.multiplayer){ this.startMainLoop()
debugObj.controller = this if(!this.multiplayer){
if(debugObj.debug){ debugObj.controller = this
debugObj.debug.updateStatus() if(debugObj.debug){
debugObj.debug.updateStatus()
}
} }
} })
} }
startMainLoop(){ startMainLoop(){
this.mainLoopStarted = false this.mainLoopStarted = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment