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.

This commit is contained in:
Richard Davey 2019-01-18 12:06:43 +00:00
parent 6fb2fd75ff
commit a151a02f2c
2 changed files with 5 additions and 4 deletions

View file

@ -239,6 +239,7 @@ one set of bindings ever created, which makes things a lot cleaner.
* `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.
* `MatterSprite` would set its `type` property to be `Image`. It now sets it to be `Sprite` as it should do.
* `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.
* 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.
### Bug Fixes

View file

@ -603,12 +603,12 @@ var SceneManager = new Class({
settings.status = CONST.CREATING;
scene.create.call(scene, settings.data);
}
if (settings.isTransition)
{
sys.events.emit('transitionstart', settings.transitionFrom, settings.transitionDuration);
}
}
// If the Scene has an update function we'll set it now, otherwise it'll remain as NOOP
if (scene.update)