Skip to content

Commit 321e11d

Browse files
committed
A State swap now sets the Loader.reset hard parameter to true by default. This will null any Loader.preloadSprite that may have been set (phaserjs#1636)
1 parent a69e53f commit 321e11d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ We've also removed functions and properties from Pixi classes that Phaser doesn'
158158
* Tween.yoyo has a new parameter `yoyoDelay` which allows you to set the delay (in ms) before a tween will start a yoyo.
159159
* Tween.interpolation has a new parameter `context` which allows you to define the context in which the interpolation function will run.
160160
* ArraySet.getByKey gets an item from the set based on the property strictly equaling the value given.
161+
* A State swap now sets the Loader.reset `hard` parameter to `true` by default. This will null any Loader.preloadSprite that may have been set.
161162

162163
### Bug Fixes
163164

src/core/StateManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Phaser.StateManager.prototype = {
336336
{
337337
// console.log('-> preload (', this.current, ')');
338338

339-
this.game.load.reset();
339+
this.game.load.reset(true);
340340
this.onPreloadCallback.call(this.callbackContext, this.game);
341341

342342
// Is the loader empty?

0 commit comments

Comments
 (0)