@@ -9,10 +9,11 @@ var GameObjectCreator = require('../plugins/GameObjectCreator');
99var GameObjectFactory = require ( '../plugins/GameObjectFactory' ) ;
1010var InputManager = require ( '../plugins/InputManager' ) ;
1111var Loader = require ( '../plugins/Loader' ) ;
12+ var PhysicsManager = require ( '../plugins/PhysicsManager' ) ;
1213var PoolManager = require ( '../plugins/PoolManager' ) ;
14+ var SceneManager = require ( '../plugins/SceneManager' ) ;
1315var Settings = require ( './Settings' ) ;
1416var StableSort = require ( '../utils/array/StableSort' ) ;
15- var SceneManager = require ( '../plugins/SceneManager' ) ;
1617var TweenManager = require ( '../tween/TweenManager' ) ;
1718var UpdateList = require ( '../plugins/UpdateList' ) ;
1819
@@ -30,7 +31,6 @@ var Systems = new Class({
3031 this . sortChildrenFlag = false ;
3132
3233 // Set by the GlobalSceneManager
33- this . mask = null ;
3434 this . canvas ;
3535 this . context ;
3636
@@ -46,19 +46,18 @@ var Systems = new Class({
4646 // Reference to Scene specific managers (Factory, Tweens, Loader, Physics, etc)
4747 this . add ;
4848 this . cameras ;
49+ this . data ;
50+ this . displayList ;
4951 this . events ;
5052 this . inputManager ;
5153 this . load ;
5254 this . make ;
55+ this . physicsManager ;
5356 this . pool ;
5457 this . sceneManager ;
5558 this . time ;
5659 this . tweens ;
57-
58- // Scene properties
5960 this . updateList ;
60- this . displayList ;
61- this . data ;
6261 } ,
6362
6463 init : function ( game )
@@ -74,27 +73,27 @@ var Systems = new Class({
7473 this . registry = game . registry ;
7574 this . textures = game . textures ;
7675
77- // Scene specific properties (transform, data, children, etc)
78-
79- this . inputManager = new InputManager ( scene , game ) ;
80- this . updateList = new UpdateList ( scene ) ;
81- this . displayList = new DisplayList ( scene ) ;
82- this . data = new Data ( scene ) ;
83-
8476 // Scene specific managers (Factory, Tweens, Loader, Physics, etc)
8577
8678 this . add = new GameObjectFactory ( scene ) ;
8779 this . cameras = new CameraManager ( scene ) ;
80+ this . data = new Data ( scene ) ;
81+ this . displayList = new DisplayList ( scene ) ;
8882 this . events = new EventDispatcher ( ) ;
83+ this . inputManager = new InputManager ( scene ) ;
8984 this . load = new Loader ( scene ) ;
9085 this . make = new GameObjectCreator ( scene ) ;
86+ this . physicsManager = new PhysicsManager ( scene ) ;
9187 this . pool = new PoolManager ( scene ) ;
92- this . sceneManager = new SceneManager ( scene , game ) ;
88+ this . sceneManager = new SceneManager ( scene ) ;
9389 this . time = new Clock ( scene ) ;
9490 this . tweens = new TweenManager ( scene ) ;
91+ this . updateList = new UpdateList ( scene ) ;
9592
9693 // Sometimes the managers need access to a system created after them
94+ this . add . boot ( ) ;
9795 this . inputManager . boot ( ) ;
96+ this . physicsManager . boot ( ) ;
9897
9998 this . inject ( ) ;
10099 } ,
@@ -130,6 +129,8 @@ var Systems = new Class({
130129 this . tweens . begin ( time ) ;
131130 this . inputManager . begin ( time ) ;
132131
132+ this . physicsManager . update ( time , delta ) ;
133+
133134 this . pool . update ( time , delta ) ;
134135 this . updateList . update ( time , delta ) ;
135136 this . time . update ( time , delta ) ;
0 commit comments