State swap example done and working.

This commit is contained in:
Richard Davey
2013-09-13 05:44:04 +01:00
parent fd0a071cb3
commit 7c6e6df91a
13 changed files with 282 additions and 11 deletions
+4 -2
View File
@@ -151,6 +151,7 @@ Phaser.StateManager.prototype = {
{
// console.log('Phaser.StateManager.addState: Object given');
newState = state;
newState.game = this.game;
}
else if (typeof state === 'function')
{
@@ -237,9 +238,10 @@ Phaser.StateManager.prototype = {
if (clearWorld) {
//this.game.world.destroy();
this.game.world.destroy();
if (clearCache == true) {
if (clearCache == true)
{
this.game.cache.destroy();
}
}