Jump to content

Correct way to control a scene


Recommended Posts

I'm trying to build an '90s style rpg game, think dragon warrior series, where it will have a UI box at the bottom of the screen where the user makes a choice like attack, move, eat etc

I'm thinking of having a game controller (phaser scene?) which updates a board scene and a UI box  scene and displays other scenes if necessary

I am thinking of passing in to the UI box an object with  message, an array of choices and  each choice will have a callback method

So as far as I can tell there are three ways to pass event information to a scene

1) use get scene method to get an instance of a scene and then make calls to that scenes methods

2) using event emitter

3) stopping and starting a scene and passing parameters into the create method

Is one way preferable or another? is there a good coding standard?  Would anyone be able to offer any other helpful hints on how to accomplish the above task


Thank you

Edited by MTiger
Link to comment
Share on other sites

  • 3 weeks later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...