Commit graph

310 commits

Author SHA1 Message Date
Richard Davey
a6341a97a8 Fixed Types references 2019-05-09 15:32:53 +01:00
Richard Davey
1dca2c2c8a Scenes Types 2019-05-09 12:37:37 +01:00
Richard Davey
e556cd9c68 Camera Types 2019-05-09 11:49:44 +01:00
Richard Davey
c6dc93dba0 Added missing plugins jsdoc hook 2019-05-08 22:13:04 +01:00
Richard Davey
935a9814ca Check SoundManager exists before accessing it. Fix #4428 2019-05-03 17:42:45 +01:00
Richard Davey
e05ff03ed0 Added Systems.renderer reference 2019-04-25 11:30:10 +01:00
Richard Davey
8c55844f6c
Merge pull request #4469 from samme/docs/scenes
Docs for scene config and optional scene methods
2019-04-16 13:24:49 +01:00
samme
f9797d0ed0 Add Phaser.Scenes.Types.CreateSceneFromObjectConfig 2019-04-10 12:43:44 -07:00
samme
698fc7d522 Docs for Scene methods
Added descriptions and arguments.
2019-04-10 12:43:00 -07:00
Richard Davey
88c8bb1bc2 Update docs to clarify #4403 2019-04-08 14:52:13 +01:00
Richard Davey
6fc05bf53b
Merge pull request #4404 from samme/feature/isPaused
Add isPaused() methods to ScenePlugin, SceneManager
2019-04-05 17:40:37 +01:00
Richard Davey
0ee2442597 Bumping to 3.17.0 2019-03-07 12:31:06 +00:00
samme
0d1e0f203d Add isPaused() methods to ScenePlugin, SceneManager 2019-02-27 12:23:02 -08:00
samme
0b2658c1b0 Docs descriptions for the isActive() methods 2019-02-27 12:19:55 -08:00
Richard Davey
c15734f1bc A Scene will now emit the new CREATE event after it has been created by the Scene Manager. If the Scene has a create method this event comes after that, so is useful to knowing when a Scene may have finished creating Game Objects, etc. 2019-02-26 11:00:20 +00:00
Richard Davey
a1265a207b The return from the ScenePlugin.add method has changed. Previously, it would return the ScenePlugin, but now it returns a reference to the Scene that was added to the Scene Manager, keeping it in-line with all other add methods in the API. Fix #4359 2019-02-25 17:12:00 +00:00
Richard Davey
35363631d6 Added jsdoc blocks 2019-02-24 23:36:56 +00:00
Richard Davey
0db663d901 More typedefs 2019-02-13 15:38:50 +00:00
Richard Davey
ccaae460a4 Added jsdoc version numbers to each event 2019-02-12 11:37:58 +00:00
Richard Davey
550ac7a051 Bumped version number 2019-02-08 13:37:07 +00:00
Elliott Wallace
6adb88619e Added this.scale property to Scene 2019-02-06 12:13:03 +00:00
Richard Davey
d04232ae54 JSDoc fixes 2019-02-04 11:45:17 +00:00
Richard Davey
eb9ed3463f Lots of namespace and jsdoc fixes 2019-02-01 18:02:58 +00:00
Richard Davey
c2db34f660 SceneManager.getScenes is a new method that will return all current Scenes being managed by the Scene Manager. You can optionally return only active scenes and reverse the order in which they are returned in the array. 2019-01-29 01:03:56 +00:00
Richard Davey
1eccff1e3b Fixed jsdoc links and markdown bullet lists 2019-01-18 15:20:56 +00:00
Richard Davey
bc962c25dc All listeners use the new Events 2019-01-18 13:41:43 +00:00
Richard Davey
b7791650b2 Added Scene Transition Events 2019-01-18 12:19:41 +00:00
Richard Davey
a151a02f2c 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. 2019-01-18 12:06:43 +00:00
Richard Davey
6fb2fd75ff Adding the Scene Events. 2019-01-17 19:51:18 +00:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
Richard Davey
c34648bbce Removed the resize method. 2019-01-11 16:43:39 +00:00
Richard Davey
de5fed7d80 Removed the resize method. 2019-01-11 16:43:25 +00:00
Patrick Sletvold
206d61284b Mark optional params as optional in jsdoc 2019-01-02 11:54:39 +01:00
Richard Davey
7b478d2860 lint fix 2018-12-12 13:14:59 +00:00
Richard Davey
52e47da344
Merge pull request #4222 from bryanwood/fix-facebook-plugin-type-on-scene
Change JSDoc @type from any to Phaser.FacebookInstantGamesPlugin
2018-12-12 11:24:53 +00:00
Bryan
d35e30dc6b Add facebook plugin to Phaser.Scene for JSDoc 2018-12-10 15:21:34 +10:00
Bryan
dc2f6153b4 Change JSDoc @type from any to Phaser.FacebookInstantGamesPlugin
This matches the definition in Phaser.Game
2018-12-10 14:24:22 +10:00
Richard Davey
0ac7decfff Clarified the docs 2018-11-16 10:57:24 +00:00
kainage
a01726f57e Fix Scene Add Data
Data was not being passed in to the scene manager when adding a scene via `add`.
2018-11-06 06:38:36 -08:00
Richard Davey
eea1b34549 Added jsdocs 2018-10-19 15:53:04 +01:00
Richard Davey
4c4421c47f Docjam merge 2018-10-19 12:32:43 +01:00
Richard Davey
557955e057 Merging Scale Manager and Spine Plugin back into master 2018-10-18 14:59:27 +01:00
Richard Davey
ae9c3b6f56 Tidying up for 3.15 release 2018-10-16 15:10:49 +01:00
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Richard Davey
953422a059 Exposed Scale Manager via global reference 2018-10-09 18:14:09 +01:00
Richard Davey
a9063604dc Replace @readOnly with @readonly 2018-10-09 13:40:00 +01:00
Richard Davey
2a1ea30cb7 Typos 2018-10-03 22:07:41 +01:00
Richard Davey
41956c4625 Added FB plugin conditional 2018-09-20 14:14:29 +01:00
Richard Davey
24e09d7a31 Completed more jsdocs 2018-09-14 18:17:14 +01:00
Richard Davey
0d497fd2be Fixed Scene restart shutdown flow 2018-09-14 18:05:14 +01:00
Richard Davey
935288518d Added isPaused method 2018-09-14 18:04:47 +01:00
Richard Davey
aeda1c042b If a Scene is already active (i.e. running) and you call start on it (such as from another Scene) then it will shutdown the Scene first, before starting it again. 2018-09-13 16:32:02 +01:00
Richard Davey
5fe6dbbe0c Added more jsdocs 2018-09-13 08:09:44 +01:00
Richard Davey
ef558fea3c Type definition fixes 2018-09-07 17:19:19 +01:00
Richard Davey
7765496b19 Moved FB plugin behind build flag 2018-08-23 18:10:20 +01:00
Richard Davey
b25ff9e065 Moved Camera3D to optional plugin
Also included build flag to allow it to be compiled into the standard lib if required (saves a bunch of KB in duplicated classes)
2018-08-23 15:30:21 +01:00
Richard Davey
beb286297c Camera3D Plugin moved out of the main src folder to optional plugin 2018-08-23 13:18:25 +01:00
Richard Davey
d0f3d85cbd Iterate from front to back for destroy 2018-07-31 11:33:38 +01:00
Richard Davey
c65e3c7428 Added FB Instant Games Plugin to core (will prepare for moving to unique build once feature complete) 2018-07-27 08:33:51 +01:00
Richard Davey
4bdecf488b jsdocs tweaks 2018-07-26 23:41:52 +01:00
Richard Davey
f2290abf9b Added new customViewports counter 2018-07-26 23:05:08 +01:00
Richard Davey
9c9e9cecbb Updated log and lint fixes 2018-07-10 16:49:53 +01:00
Richard Davey
cd508ab3f1 The ScenePlugin will now queue all of the following ops with the Scene Manager: start, run, pause, resume, sleep, wake, switch and stop. This means for all of these calls the Scene Manager will add the call into its queue and process it at the start of the next frame. 2018-07-09 14:08:55 +01:00
Richard Davey
7aa46657c2 Tidying up jsdocs and changing float to number 2018-06-26 23:19:14 +01:00
Richard Davey
f1190529d2 ScenePlugin.start and ScenePlugin.restart will now always queue the op with the Scene Manager, regardless of the state of the Scene, in order to avoid issues where plugins carry on running for a frame before closing down. Fix #3776 2018-06-26 16:35:45 +01:00
Richard Davey
b95f980023 Added in data object passing to all relevant methods #3748 2018-06-26 16:08:14 +01:00
Richard Davey
1d4a15f297
Merge pull request #3748 from rook2pawn/wake-resume-data-from-run
[feat] scene.run can now pass data to .wake and .resume if it needs
2018-06-26 15:28:50 +01:00
rook2pawn
b040146b4a simplified logic on queueOp starting an unready scene 2018-06-22 03:55:21 -07:00
rook2pawn
dd53268a23 removed superfluous queue stop 2018-06-22 03:37:14 -07:00
rook2pawn
c09b4baf16 [fix] sceneManager run will queueOp if scene not ready
fixed linting
2018-06-22 03:37:14 -07:00
rook2pawn
44a0813591 [feat] scene.run can now pass data to .wake and .resume if it needs to invoke those methods
update javadoc for scene and scene systems
2018-06-22 03:32:17 -07:00
Richard Davey
19eb363a84 Only set Scene status to running if still in creating 2018-06-13 17:27:30 +01:00
Richard Davey
579f5bf4a1 Added the new sceneUpdate reference property. 2018-06-12 16:21:37 +01:00
Richard Davey
eb8d3ccdf1 No longer injects update into a Scene, and now calls step from init onwards. 2018-06-12 16:21:17 +01:00
Richard Davey
bf46135d84 Allow for Scene level input settings 2018-06-08 15:16:09 +01:00
Richard Davey
43fd10bbc1 ScenePlugin.run is a new method that will run the given Scene and not change the state of the current Scene at all. If the scene is asleep, it will be woken. If it's paused, it will be resumed. If not running at all, it will be started. 2018-06-08 15:07:00 +01:00
Richard Davey
6906e6bd15 Hundreds more jsdocs completed. 2018-06-04 15:19:25 +01:00
Richard Davey
0b1d32b571 New registerFileType argument, new Global Plugin mapping and createEntry method
* PluginManager.registerFileType has a new property `addToScene` which allows you to inject the new file type into the LoaderPlugin of the given Scene. You could use this to add the file type into the Scene in which it was loaded.
* PluginManager.install has a new property `mapping`. This allows you to give a Global Plugin a property key, so that it is automatically injected into any Scenes as a Scene level instance. This allows you to have a single global plugin running in the PluginManager, that is injected into every Scene automatically.
* PluginManager.createEntry is a new private method to create a plugin entry and return it. This avoids code duplication in several other methods, which now use this instead.
2018-05-18 18:43:27 +01:00
Michael B
e322ed7916
jsdoc fixes 2018-05-18 02:56:32 +02:00
Richard Davey
350cb037b7 All systems now register themselves with the new PluginCache 2018-05-15 12:51:50 +01:00
Richard Davey
4959ed70ef Now gets the list from the PluginManager 2018-05-11 16:00:46 +01:00
Richard Davey
e431cc33f9 Moved plugins file to DefaultPlugins and changed the namespace 2018-05-11 14:06:13 +01:00
Richard Davey
f6d8606daa Fixed type 2018-05-10 22:01:40 +01:00
Richard Davey
be330e609e Moved PluginManager to new location 2018-05-10 17:14:33 +01:00
Richard Davey
b1d41e506f Typo fix 2018-05-09 12:11:29 +01:00
Richard Davey
0415dfbb7e lint fixes 2018-05-04 15:16:20 +01:00
Richard Davey
ebf77e2bbc The Scene Settings payload property has changed from files to pack and now follows the Pack File format. 2018-05-04 14:33:28 +01:00
Richard Davey
a14ce15685 Fixed setActive and setVisible 2018-05-01 12:35:56 +01:00
Richard Davey
e1532b3154 The Scene Systems will emit a ready event when it has fully finished starting up and all plugins are available. Fix #3636 2018-05-01 12:22:18 +01:00
Richard Davey
425acd3f63 Fixed moveAbove and moveBelow 2018-05-01 01:23:34 +01:00
Richard Davey
5d3c06d8b7 ScenePlugin.getIndex will return the index of the given Scene in the Scene List. 2018-05-01 01:23:19 +01:00
Richard Davey
a07cc81806 Fixed passing of data for freshly added Scenes 2018-04-25 17:14:10 +01:00
Daniel
2c584d3d0e Fill all description tags in GetPhysicsPlugins.js 2018-04-22 16:50:09 +10:00
Richard Davey
b0544c73b8 jsdoc fixes 2018-04-18 13:29:22 +01:00
Richard Davey
55965c748f jsdoc fixes 2018-04-18 12:13:49 +01:00
Richard Davey
529cdedc70 Re-enabled getScene. #3579 2018-04-17 15:07:54 +01:00
Richard Davey
1be486fab4 destroy only called once, no matter how many times the Scene restarts. Fix #3581 2018-04-17 12:25:45 +01:00
Richard Davey
1507dcf448 eslint fix 2018-04-16 17:16:07 +01:00
Richard Davey
b28a7276f4 Fixed Game.destroy 2018-04-16 17:02:32 +01:00
Richard Davey
b392dee5a9 More jsdoc fixes 2018-04-16 15:11:51 +01:00
Richard Davey
bd023c20df Clear listeners on shutdown, tighten up the flow and allow you to remove a scene after transition 2018-04-15 23:14:56 +01:00
Richard Davey
ce7d67297f Moving from 3.4.1 to 3.5.0 so we can release new camera fx and scene transitions 2018-04-15 12:44:47 +01:00
Pavle Goloskokovic
d87daba379 Merge remote-tracking branch 'origin/master' 2018-04-14 18:56:45 +02:00
Pavle Goloskokovic
433247f515 Unlocking sound manager after preloading any scene when using HTML5 audio 2018-04-14 17:47:29 +02:00
Richard Davey
a56465fdad jsdoc tweak 2018-04-14 12:35:28 +01:00
Richard Davey
2b4e5ecd23 Is scene is asleep, wake it rather than start it 2018-04-14 04:28:39 +01:00
Richard Davey
b519e24279 lint fix 2018-04-14 04:27:39 +01:00
Richard Davey
352ec91bb5 New methods to determine if a Scene is transitioning 2018-04-14 04:24:21 +01:00
Richard Davey
2a73964399 Added new transition properties 2018-04-14 04:24:05 +01:00
Richard Davey
370fbdd5f2 Added transition progress, sleep support and better checking 2018-04-14 04:23:57 +01:00
Richard Davey
2698fe1b58 Clear out the transition events 2018-04-14 04:23:24 +01:00
Richard Davey
616d17fa83 Sorted out the scene event order, targets and callbacks 2018-04-13 20:12:29 +01:00
Richard Davey
cfb1826da9 Added new test feature 2018-04-13 18:59:00 +01:00
Richard Davey
18a6cf8ad1 eslint fixes 2018-04-13 18:09:16 +01:00
Richard Davey
6b2307594a Scene plugin flow overhaul
Every Plugin has been updated to correctly follow the same flow through the Scene lifecycle. Instead of listening for the Scene 'boot' event, which is only dispatched once (when the Scene is first created), they will now listen for the Scene 'start' event, which occurs every time the Scene is started. All plugins now consistently follow the same Shutdown and Destroy patterns too, meaning they tidy-up after themselves on a shutdown, not just a destroy. Overall, this change means that there should be less issues when returning to previously closed Scenes, as the plugins will restart themselves properly.
2018-04-13 17:12:17 +01:00
Richard Davey
623df29522 The Scene Manager would never reach an isBooted state if you didn't add any Scenes into the Game Config. Fix #3553 2018-04-13 12:24:02 +01:00
Sebastian Warmbrunn
968c0a3aec Add typedef for new scene config option mapAdd
Also add a description for mapAdd and map config options.
2018-04-09 21:32:19 +02:00
Sebastian Warmbrunn
593245742e Add a config to merge keys into scene InjectionMap
This way the defaults of the scene injection map are kept and the user
is able to merge with those defaults.
2018-04-09 21:16:45 +02:00
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
66a9bec9bb Only set data if it's not undefined. 2018-04-09 12:57:03 +01:00
Richard Davey
bf368ab70b ScenePlugin.restart allows you to restart the current Scene. It's the same result as calling ScenePlugin.start without any arguments, but is more clear. 2018-04-09 12:56:28 +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
Eirik S Korsnes
798356cb64 jsdoc: fix correct type reference on Scene#load 2018-04-04 20:19:21 +02:00
Richard Davey
c1e5aa72ef Added jsdocs for TS defs export 2018-04-03 15:08:48 +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
Richard Davey
d8e378b052 Updated comments 2018-03-30 17:01:29 +01:00
Richard Davey
89c963c19c Ignore consts 2018-03-30 14:38:58 +01:00
pixelhijack
e728f3a1b9 [ISSUE #3363] Phaser Scene - passing data to scene init & create methods 2018-03-29 21:40:32 +02:00
Richard Davey
91008232ad jsdoc fixes 2018-03-29 13:12:07 +01:00
Richard Davey
f1e646c9ee jsdoc fixes 2018-03-28 15:39:57 +01:00
orblazer
ed1f2a7011 Fix wrong types 2018-03-22 13:51:30 +01: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
Richard Davey
4fe6a25117 Added jsdoc data types 2018-03-19 11:25:46 +00:00
orblazer
6a4dd8db8f Update JSDoc on Renderer and Scene 2018-03-19 01:59:59 +01:00
Arkadiusz Buras
e981932db1
Remove scene key in SceneManager 2018-03-17 13:42:42 +01:00
Richard Davey
a524dc44b0 Expose constants. Fix #3387 2018-03-16 13:29:30 +00:00
Richard Davey
a6d742227c
Merge pull request #3394 from stuff/patch-2
pass data to the manager queue when starting a scene
2018-03-16 13:00:25 +00:00
Nicolas Challeil
53de26e572
pass data to the manager queue 2018-03-14 23:52:00 +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
7adcb66267 Merge branch 'master' of https://github.com/photonstorm/phaser 2018-03-09 15:42:27 +00: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
migiyubi
decbe18705 Make scene restartable 2018-03-08 20:27:22 +09: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