Commit graph

86 commits

Author SHA1 Message Date
Richard Davey
ca2097f4e2 Recoded how the boot data and processing works to allow for more flexibility when setting-up scenes. Updates #3470 2018-04-09 12:57:47 +01:00
Richard Davey
a0dcfdd3fc
Merge pull request #3470 from pixelhijack/fix-issue-3363
[ISSUE #3363] Phaser Scene - passing data to scene init & create methods
2018-04-09 10:20:57 +01:00
Chris Andrew
f3675b6085 Added a missing full stop. 🚀 2018-04-02 18:43:41 +01:00
Chris Andrew
e047977f52 Documented the ScenePlugin class. 2018-04-02 18:29:23 +01:00
Chris Andrew
7eb0342663 Documented the SceneManager. 2018-04-02 18:01:17 +01:00
pixelhijack
e728f3a1b9 [ISSUE #3363] Phaser Scene - passing data to scene init & create methods 2018-03-29 21:40:32 +02:00
orblazer
dcd80375c0 Fix "object" types on Renderer and Scene 2018-03-21 14:41:17 +01:00
orblazer
7fba122321 Fix "any" types 2018-03-20 17:15:49 +01:00
orblazer
44103dc475 Fix remaining multiple types 2018-03-20 16:12:42 +01:00
orblazer
4cff464555 Fix nullable types 2018-03-20 15:36:03 +01:00
Arkadiusz Buras
e981932db1
Remove scene key in SceneManager 2018-03-17 13:42:42 +01:00
samme
55ccf7f026 Remove unused callbacks in createSceneFromObject
Phaser never calls 'shutdown' or 'destroy' methods.
2018-03-14 13:28:04 -07:00
Richard Davey
db3112de31 The SceneManager.render will now render a Scene as long as it's in a LOADING state or higher. Before it would only render RUNNING scenes, but this precluded those that were loading assets. 2018-03-09 15:33:07 +00:00
Richard Davey
1e6bfe660f Removed accidental overwrite of the object key #3185 2018-03-05 16:58:59 +00:00
Richard Davey
5168300463 The SceneManager now employs a new queue for all pending Scenes, creating them and booting them in strict sequence. This should prevent errors where Scenes were unable to reference other Scenes further down the boot list in their create functions. Fix #3314 2018-03-05 14:48:30 +00:00
Richard Davey
7c16368d3e SceneManager uses new internal boot queue. 2018-03-05 14:11:42 +00:00
Richard Davey
ae1c91cf6a eslint fixes 2018-03-05 01:40:11 +00:00
Richard Davey
95d85576c9 SceneManager.moveAbove and moveBelow added.
SceneManager.moveAbove will move a Scene to be directly above another Scene in the Scenes list. This is also exposed in the ScenePlugin.

SceneManager.moveBelow will move a Scene to be directly below another Scene in the Scenes list. This is also exposed in the ScenePlugin.
2018-03-02 18:25:44 +00:00
Richard Davey
9a6e6265e8 The SceneManager no longer renders a Scene unless it is visible AND either running or paused. This now skips Scenes that are in an init state. 2018-03-02 17:48:45 +00:00
Richard Davey
98930de3a8 The SceneManager has a new method: remove which allows you to remove and destroy a Scene, freeing up the Scene key for use by future scenes and potentially clearing the Scene from active memory for gc. 2018-03-02 03:50:55 +00:00
srobertson421
66e881c7eb swapped queue loop to use _queue prop rather than queueLength var 2018-02-28 12:25:43 -08:00
Richard Davey
e6059f65cd SceneManager invokes resize method on all Systems. 2018-02-28 17:18:55 +00:00
Richard Davey
8f4a1012fd Updated jsdocs. 2018-02-13 01:39:22 +00:00
Richard Davey
5ad167a8bf Added jsdocs 2018-02-12 16:18:34 +00:00
Richard Davey
d1f5f8a82b Added jsdocs 2018-02-12 16:01:21 +00:00
Richard Davey
a802914243 Added in destroy methods for all managers and invoked them from Game 2018-01-31 03:38:10 +00:00
Richard Davey
9988e4eb5b Removed un-needed files and moved plugins around. 2018-01-26 05:21:45 +00:00
Richard Davey
123c8f8127 Calls to the Scene Manager that happen before the Scene is running are now queued
Thanks to gdomaradzki for bringing this one to my attention!
2018-01-23 02:12:33 +00:00
Richard Davey
f9cc2a9714 Scene now sets a status flag for every state it goes through, allowing the manager to know when to allow updating and rendering 2018-01-20 16:22:40 +00:00
Richard Davey
f676fc2bbd Recoded the SceneManage
The Scene Manager no longer tries to maintain an 'active' list and instead just iterates the scenes in order, skipping those that aren't awake. Scene array changing events like moveUp etc are queued if the list is being processed and the ScenePlugin has been vastly updated to take care of this. You can now happily move scenes around the list, block scene input, consume input events, switch scenes around and more.
2018-01-20 04:47:03 +00:00
Richard Davey
2f1ee57505 Fixed event handler. 2018-01-19 19:13:11 +00:00
Richard Davey
25089f66fd Scene will now be made active as soon as it has init'd, not after the load is complete. This allows a scene to render while loading assets. 2018-01-19 16:30:05 +00:00
Richard Davey
2deb9edc9e Plugins now check to see if the Scene is already booted and adapt accordingly. 2018-01-18 14:00:31 +00:00
Richard Davey
e017a71f32 Game emits a boot event, which its managers listen for 2018-01-18 05:16:52 +00:00
Richard Davey
f9a7939812 Lots of work migrating to the new plugin system, fixing references and exposing on the namespace 2018-01-16 22:28:29 +00:00
Richard Davey
570cbde7da Renamed SceneManager. 2018-01-16 16:33:30 +00:00
Renamed from src/scene/global/GlobalSceneManager.js (Browse further)