JazzAceman Posted March 26, 2015 Share Posted March 26, 2015 Hello, I'm new to Phaser and this forum. I am currently dealing with game state transitions and I was wondering because in the Phaser.State.prototype object is a method called "paused" wich get called when the game goes in pause mode. But there was no "awake" method, neither in the documentation nor in the implementation of the Phaser.State.prototype object. But than I saw that there is an "OnResumedCallback" property in Phaser.StateManager. Looking in the source code I saw that this property is setted by the framework to an method called "resumed" for the current active Game State. I've tried it out and and it worked: If I override the (non existing) Phaser.State.prototype.resumed() method, this method is called by the framework when the game returns to active mode. My question is: Is there a reason that this method is not implemented in the Phaser.State.prototype Object? Is it a deprecated method or can I use this method in that way? Thanks for your help! Link to comment Share on other sites More sharing options...
rich Posted March 26, 2015 Share Posted March 26, 2015 Actually I think it's just an oversight in the State class template file - you can use it safely, it won't be removed. https://github.com/photonstorm/phaser/commit/49be59b0c9683f38d25b4de8998bd82a175af7cc JazzAceman 1 Link to comment Share on other sites More sharing options...
Recommended Posts