MTiger Posted March 28, 2020 Share Posted March 28, 2020 (edited) 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 March 29, 2020 by MTiger Grammer Link to comment Share on other sites More sharing options...
supertommy Posted April 14, 2020 Share Posted April 14, 2020 I personally prefer the EventEmitter method since I feel it keeps things most decoupled. I'm also a big fan of ReactiveX (rxjs), Observables, and Signals ? so I might be biased. This is how I would use EventEmitter to pass messages between Scenes: https://blog.ourcade.co/posts/2020/phaser3-how-to-communicate-between-scenes/ Link to comment Share on other sites More sharing options...
Recommended Posts