Lindsey Posted December 14, 2017 Share Posted December 14, 2017 I Just finished the beginners "Making your first game" tutorial. I'm a student and I want to integrate phaser into my final project, but have never used it before This is my second day and I currently am confused about how to make multiple levels by implementing states. Basically I want the player to reach a certain object in the game and when they interact I want the level to change to the next level. I would like to be able to call this.state.start('level_two'); once the object has been reached. I am just confused on how to do a basic set up of states. Any advice or direction? Link to comment Share on other sites More sharing options...
samme Posted December 17, 2017 Share Posted December 17, 2017 It may be a little simpler to use just one state, store the current level number (1, 2, 3, …), and then restart the game state for each new level. I can post an example tomorrow. For basic states see https://codepen.io/samme/details/jYbmeo/. in mono and erich 2 Link to comment Share on other sites More sharing options...
samme Posted December 19, 2017 Share Posted December 19, 2017 Actually platformer/switching-levels/ is quite good on this. Whole series at https://mozdevs.github.io/html5-games-workshop/. Link to comment Share on other sites More sharing options...
Recommended Posts