@@ -215,14 +215,19 @@ export class Drawer {
215215 }
216216
217217 var demoContainer = new PIXI . Container ( )
218-
219- this . initDefaultFrames ( this . demo . playerCount , this . demo . frames , this . demo . agents )
220- /** **************************************************************************************************************************************** */
221- this . preconstructScene ( this . scope , container , this . initWidth , this . initHeight )
222- this . initScene ( this . scope , demoContainer , this . frames , true )
223- this . updateScene ( this . scope , this . question , this . frames , this . currentFrame , this . progress , 1 , this . reasons [ this . currentFrame ] , true )
224- /** **************************************************************************************************************************************** */
225-
218+ try {
219+ this . initDefaultFrames ( this . demo . playerCount , this . demo . frames , this . demo . agents )
220+ /** **************************************************************************************************************************************** */
221+ this . preconstructScene ( this . scope , container , this . initWidth , this . initHeight )
222+ this . initScene ( this . scope , demoContainer , this . frames , true )
223+ this . updateScene ( this . scope , this . question , this . frames , this . currentFrame , this . progress , 1 , this . reasons [ this . currentFrame ] , true )
224+ /** **************************************************************************************************************************************** */
225+ } catch ( error ) {
226+ ErrorLog . push ( {
227+ cause : error ,
228+ message : 'Cannot load demo, you might want to reset the demo'
229+ } )
230+ }
226231 scope . demo = demoContainer
227232 scope . demotime = 0
228233
0 commit comments