dthrasher90 Posted March 21, 2017 Share Posted March 21, 2017 breakHuddle = this.add.text(820, 400, "BREAK!", {font: '24px Press Start 2p', fill: '#ffffff'}); breakHuddle.inputEnabled = true; breakHuddle.events.onInputDown.add(switchState, this); function switchState(){ game.state.start('GameActionState'); } Cant seem to get this to work... is this the right idea? I am intending to switch states on a button press (text overlay). Link to comment Share on other sites More sharing options...
FakeWizard Posted March 22, 2017 Share Posted March 22, 2017 so did you test if the switchState is being called at all? or what is the problem? Can you see any errors in your browser's console? Link to comment Share on other sites More sharing options...
Recommended Posts