Skip to content

Commit a151a02

Browse files
committed
The Scene transitionstart event is now dispatched by the Target Scene of a transition, regardless if the Scene has a create method or not. Previously, it was only dispatched if the Scene had a create method.
1 parent 6fb2fd7 commit a151a02

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ one set of bindings ever created, which makes things a lot cleaner.
239239
* `Map.set` will now update an existing value if you provide it with a key that already exists within the Map. Previously, if you tried to set the value of a key that existed it would be skipped.
240240
* `MatterSprite` would set its `type` property to be `Image`. It now sets it to be `Sprite` as it should do.
241241
* `Matter.TileBody.setFromTileCollision` no longer checks if the shape is concave or convex before modifying the vertices, as the update to the Matter.js lib in 3.12 stopped this from working with Tiled collision shapes.
242+
* The Scene `transitionstart` event is now dispatched by the Target Scene of a transition, regardless if the Scene has a `create` method or not. Previously, it was only dispatched if the Scene had a create method.
242243

243244
### Bug Fixes
244245

src/scene/SceneManager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,11 +603,11 @@ var SceneManager = new Class({
603603
settings.status = CONST.CREATING;
604604

605605
scene.create.call(scene, settings.data);
606+
}
606607

607-
if (settings.isTransition)
608-
{
609-
sys.events.emit('transitionstart', settings.transitionFrom, settings.transitionDuration);
610-
}
608+
if (settings.isTransition)
609+
{
610+
sys.events.emit('transitionstart', settings.transitionFrom, settings.transitionDuration);
611611
}
612612

613613
// If the Scene has an update function we'll set it now, otherwise it'll remain as NOOP

0 commit comments

Comments
 (0)