@@ -75,8 +75,6 @@ StateManager.prototype = {
7575 // this.game.onPause.add(this.pause, this);
7676 // this.game.onResume.add(this.resume, this);
7777
78- console . log ( 'StateManager.boot' ) ;
79-
8078 for ( var i = 0 ; i < this . _pending . length ; i ++ )
8179 {
8280 var entry = this . _pending [ i ] ;
@@ -137,7 +135,7 @@ StateManager.prototype = {
137135 autoStart : autoStart
138136 } ) ;
139137
140- console . log ( 'StateManager not yet booted, adding to list' , this . _pending . length ) ;
138+ // console.log('StateManager not yet booted, adding to list', this._pending.length);
141139
142140 return ;
143141 }
@@ -148,20 +146,20 @@ StateManager.prototype = {
148146
149147 if ( stateConfig instanceof State )
150148 {
151- console . log ( 'StateManager.add from instance' , key ) ;
149+ // console.log('StateManager.add from instance', key);
152150 newState = this . createStateFromInstance ( key , stateConfig ) ;
153151 }
154152 else if ( typeof stateConfig === 'object' )
155153 {
156- console . log ( 'StateManager.add from object' , key ) ;
154+ // console.log('StateManager.add from object', key);
157155
158156 stateConfig . key = key ;
159157
160158 newState = this . createStateFromObject ( key , stateConfig ) ;
161159 }
162160 else if ( typeof stateConfig === 'function' )
163161 {
164- console . log ( 'StateManager.add from function' , key ) ;
162+ // console.log('StateManager.add from function', key);
165163
166164 newState = this . createStateFromFunction ( key , stateConfig ) ;
167165 }
@@ -319,7 +317,7 @@ StateManager.prototype = {
319317 // if not booted, then put state into a holding pattern
320318 if ( ! this . game . isBooted )
321319 {
322- console . log ( 'StateManager not yet booted, setting autoStart on pending list' ) ;
320+ // console.log('StateManager not yet booted, setting autoStart on pending list');
323321
324322 for ( var i = 0 ; i < this . _pending . length ; i ++ )
325323 {
@@ -361,16 +359,13 @@ StateManager.prototype = {
361359 // Is the loader empty?
362360 if ( state . sys . load . list . size === 0 )
363361 {
364- console . log ( 'Loader: Empty queue' ) ;
365362 this . startCreate ( state ) ;
366363 }
367364 else
368365 {
369- console . log ( '-------------------> Loader: Start' ) ;
370-
371366 // Start the loader going as we have something in the queue
372367
373- state . sys . load . events . on ( 'LOADER_COMPLETE_EVENT' , this . loadComplete . bind ( this ) ) ;
368+ state . sys . load . events . once ( 'LOADER_COMPLETE_EVENT' , this . loadComplete . bind ( this ) ) ;
374369
375370 state . sys . load . start ( ) ;
376371 }
@@ -386,13 +381,8 @@ StateManager.prototype = {
386381
387382 loadComplete : function ( event )
388383 {
389- console . log ( 'Loader: Complete' ) ;
390- console . log ( arguments ) ;
391-
392384 var state = event . loader . state ;
393385
394- console . log ( state ) ;
395-
396386 // Make sure to do load-update one last time before state is set to _created
397387
398388 // Stop doing this ...
0 commit comments