KevinYen Posted May 31, 2018 Share Posted May 31, 2018 In Phaser2 We can use game.world.removeAll(true); or game.state.start(key, true, false); And how do I do same function in Phaser3 ? Link to comment Share on other sites More sharing options...
sharks Posted June 1, 2018 Share Posted June 1, 2018 I asked a similar question - might be helpful Link to comment Share on other sites More sharing options...
KevinYen Posted June 4, 2018 Author Share Posted June 4, 2018 Thanks a lot. sharks I found one way to keep gameobject across another scenes. gameObject.ignoreDestroy = true; and when you go across another scene, you need to setup displayList. this.sys.displayList.add(gameObject); If I want to clear all game objects, just shutdown this scene. (start another scene or restart) (if gameObject.ignoreDestroy == false) Link to comment Share on other sites More sharing options...
Recommended Posts