Prime8 Posted July 17, 2014 Share Posted July 17, 2014 Hi, I'm using vinod777's cool method of scaling for multiple devices, resolution and screens as detailed in this thread: http://www.html5gamedevs.com/topic/5949-solution-scaling-for-multiple-devicesresolution-and-screens/ Because I'm using the yeoman generator, achieving this became a bit more complicated than I would have liked, although I'm sure I've gone around the houses with some of my solutions. vinod777 declares states like this:game.state.add('Boot', BasicGame.Boot);Whereas the Yeoman does it like thisgame.state.add('boot', require('./states/boot'));vinod777 is then able to assign variables to BasicGame. As I don't have BasicGame to assign to, I'm using global variables, which does work, but is there a more obvious way of doing this which I'm missing due to my noobishness? Link to comment Share on other sites More sharing options...
Prime8 Posted July 17, 2014 Author Share Posted July 17, 2014 Hey, I worked it out myself. When I created the game I didvar game = new Phaser.Game( ... )So in main, I can use game.varNameand in States, I use this.game.varNameI knew there had to be an easier way Link to comment Share on other sites More sharing options...
Recommended Posts