mk_03 Posted September 5, 2016 Share Posted September 5, 2016 How can i control the initilization of the game, i know that the first that phaser do is the preload function but i want to execute some Js code and till that part is finished start the game. Help please Link to comment Share on other sites More sharing options...
symof Posted September 5, 2016 Share Posted September 5, 2016 This is part of the examples. http://phaser.io/examples/v2/loader/load-events Your other option would be to use states. http://phaser.io/news/2015/06/using-states-tutorial mk_03 1 Link to comment Share on other sites More sharing options...
rich Posted September 6, 2016 Share Posted September 6, 2016 The first thing Phaser calls is the 'init' function, then 'preload'. So you can put code you need to set-up inside of 'init'. If you need to wait for that code to have finished before preloading, I would use a Boot State for it, then move to a Preload state. mk_03 1 Link to comment Share on other sites More sharing options...
Recommended Posts