Commit graph

63 commits

Author SHA1 Message Date
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
a993251dea ScenePlugin.swapPosition now allows you to use it to swap the positions of any two Scenes. Before the change it only allowed you to swap the position of the calling Scene and another one, but a new optional keyB argument opens this up. 2018-03-02 17:47:01 +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
Richard Davey
63e5681073
Merge pull request #3287 from gaudeon/master
BugFix for ScenePlugin.launch, data now passed to queued scenes
2018-02-28 20:47:51 +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
e44ce76214 Scene.Systems resize handler added. 2018-02-28 17:18:40 +00:00
Travis Chase
ca0366bfc8 launching a scene that is not running will now pass data through when start op is called for this scene in the scene process queue 2018-02-26 22:04:58 -07:00
AleBles
697d096221 Added data to ScenePlugin, fixes #3180 2018-02-22 12:34:19 +01:00
Rafael Barbosa Lopes
7d64c12e66 Removed unused queue property in ScenePlugin. 2018-02-19 10:00:52 -03:00
Richard Davey
d23688c3e4 Added eslint fixes and overrides 2018-02-16 18:44:07 +00:00
Richard Davey
8f4a1012fd Updated jsdocs. 2018-02-13 01:39:22 +00:00
Richard Davey
2813ac8162 Moved PluginManager and merged configs into single root file for easier changing. 2018-02-12 23:03:48 +00:00
Richard Davey
b6b8f70550 DisplayList now just extends List and removed the Plugin, as it acts as its own plugin now. 2018-02-12 16:59:57 +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
fd9cf6c1f7 Added jsdocs 2018-02-12 15:18:31 +00:00
Richard Davey
bc87630d61 Added jsdocs. 2018-02-09 18:03:39 +00:00
Richard Davey
2a86400a28 Added in jsdocs 2018-01-31 13:54:44 +00:00
Richard Davey
f73d66a246 Merge branch 'master' of https://github.com/photonstorm/phaser 2018-01-31 03:38:13 +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
Felipe Alfonso
d9b04ef2e9 Light2D Plugin added to scene 2018-01-30 19:46:43 -03:00
Richard Davey
bc2263dbd4 Fixed Camera3D Plugin, exposed it via camera3d in a Scene and added cameras to local array.
Closes #3188
2018-01-30 13:15:50 +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
2b4d6f17c8 Removed unused consts 2018-01-20 04:45:27 +00:00
Richard Davey
2f1ee57505 Fixed event handler. 2018-01-19 19:13:11 +00:00
Richard Davey
7e0b04df70 You can now specify Loader settings (baseURL, path, xhr settings, etc) in either the Game Config, the Scene Config or a File Config. Game config is used as the defaults. Scene config overrides those, and a File config overrides the Scene config. This fixes #3168. 2018-01-19 16:56:41 +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
fb7cdbf29b Added ability to load plugins from external files and have them register with the PluginManager. 2018-01-18 16:48:25 +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
69dbe38c9f Scene.Systems keeps track of it's booted, so plugins know how to respond to the boot event (or not). You can now also load a plugin into a Scene at runtime. 2018-01-18 13:59:37 +00:00
Richard Davey
3bb6099c6d Fixed key issue 2018-01-18 05:33:54 +00:00
Richard Davey
c8d859c6a4 Systems now does everything based on events and config files, no more creation of its own plugins 2018-01-18 05:20:57 +00:00
Richard Davey
43d7e0fa0e Exposed the global and core plugins and updated the injection map 2018-01-18 05:20:33 +00:00
Richard Davey
53ec770696 Renamed to the correct class name: ScenePlugin 2018-01-18 05:20:00 +00:00
Richard Davey
0a523062f5 Exposed the Scene files via their own export 2018-01-18 05:19:42 +00:00
Richard Davey
776d178b38 Scene settings now checks for a plugins array 2018-01-18 05:18:45 +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
ddba95873d Moved Arcade and Impact Physics over to the new plugin system 2018-01-17 03:41:58 +00:00
Richard Davey
a7bd9482fd Fixed input injection 2018-01-16 23:18:02 +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
8e07320596 Migrating to plugins 2018-01-16 19:49:13 +00:00