restart(clearWorld, clearCache, parameter)
Restarts the current State. State.shutDown will be called (if it exists) before the State is restarted.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
clearWorld | boolean | <optional> | true | Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly) |
clearCache | boolean | <optional> | false | Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well. |
parameter | * | <repeatable> | Additional parameters that will be passed to the State.init function if it has one. |
- Source code: core/StateManager.js (Line 291)
Please login to continue.