Wait for backgrounds to render before starting
This commit is contained in:
parent
96b8e9f3a2
commit
f523700dc4
@ -36,6 +36,7 @@ class Controller{
|
|||||||
syncWith.game.startDate = this.game.startDate
|
syncWith.game.startDate = this.game.startDate
|
||||||
this.syncWith = syncWith
|
this.syncWith = syncWith
|
||||||
}
|
}
|
||||||
|
requestAnimationFrame(() => {
|
||||||
this.startMainLoop()
|
this.startMainLoop()
|
||||||
if(!this.multiplayer){
|
if(!this.multiplayer){
|
||||||
debugObj.controller = this
|
debugObj.controller = this
|
||||||
@ -43,6 +44,7 @@ class Controller{
|
|||||||
debugObj.debug.updateStatus()
|
debugObj.debug.updateStatus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
startMainLoop(){
|
startMainLoop(){
|
||||||
this.mainLoopStarted = false
|
this.mainLoopStarted = false
|
||||||
|
Loading…
Reference in New Issue
Block a user