Skip to content

Commit eeff786

Browse files
committed
StateManager.restart incorrectly skipped the first additional parameter after clearCache (thanks @mariusbrn, fix phaserjs#722)
1 parent 25a93cf commit eeff786

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Version 2.0.4 - "Mos Shirare" - in development
8383
* Fixed the use of the destroy parameter in Group.removeAll and related functions (thanks @AnderbergE, fix #717)
8484
* P2.World.convertTilemap now correctly checks the collides parameter of the tiles as it converts them.
8585
* Animation.destroy didn't correctly clear the onStart, onLoop and onComplete signals.
86-
86+
* StateManager.restart incorrectly skipped the first additional parameter after clearCache (thanks @mariusbrn, fix #722)
8787

8888

8989
There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) available for those converting from Phaser 1.x to 2.x. In the guide we detail the API breaking changes and approach to our new physics system.

src/core/StateManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ Phaser.StateManager.prototype = {
275275
this._clearWorld = clearWorld;
276276
this._clearCache = clearCache;
277277

278-
if (arguments.length > 3)
278+
if (arguments.length > 2)
279279
{
280-
this._args = Array.prototype.splice.call(arguments, 3);
280+
this._args = Array.prototype.splice.call(arguments, 2);
281281
}
282282

283283
},

0 commit comments

Comments
 (0)