mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Cutting out the noise.
This commit is contained in:
parent
048e11bc5e
commit
2b3127c405
5 changed files with 16 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: 'b52ef110-bbc6-11e6-b803-3d5519c57e8c'
|
||||
build: 'ecf1bb90-bbc7-11e6-beca-a9f2e8e0caf0'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -131,8 +131,6 @@ EventBinding.prototype = {
|
|||
|
||||
dispatch: function (event)
|
||||
{
|
||||
console.log('EventBinding.dispatch', this.active.length);
|
||||
|
||||
if (this.state !== CONST.DISPATCHER_IDLE)
|
||||
{
|
||||
throw new Error('Error: Failed to execute \'EventDispatcher.dispatch\' on \'' + this.type + '\': The event is already being dispatched.');
|
||||
|
|
|
@ -40,8 +40,6 @@ EventDispatcher.prototype = {
|
|||
binding.add(listener, priority, false);
|
||||
}
|
||||
|
||||
console.log('on', binding);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -122,8 +120,6 @@ EventDispatcher.prototype = {
|
|||
|
||||
_dispatchHandler: function (event)
|
||||
{
|
||||
console.log('_dispatchHandler', event.type);
|
||||
|
||||
event.reset(this);
|
||||
|
||||
// Pass the event through the filters first
|
||||
|
@ -144,9 +140,6 @@ EventDispatcher.prototype = {
|
|||
|
||||
var binding = this.getBinding(event.type);
|
||||
|
||||
console.log('_dispatchHandler', binding);
|
||||
console.dir(this.bindings);
|
||||
|
||||
if (binding)
|
||||
{
|
||||
binding.dispatch(event);
|
||||
|
|
|
@ -86,7 +86,7 @@ BaseLoader.prototype = {
|
|||
|
||||
start: function ()
|
||||
{
|
||||
console.log('BaseLoader start. Files to load:', this.list.size);
|
||||
// console.log('BaseLoader start. Files to load:', this.list.size);
|
||||
|
||||
if (!this.isReady())
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ BaseLoader.prototype = {
|
|||
|
||||
processLoadQueue: function ()
|
||||
{
|
||||
console.log('BaseLoader processLoadQueue', this.list.size);
|
||||
// console.log('BaseLoader processLoadQueue', this.list.size);
|
||||
|
||||
var _this = this;
|
||||
|
||||
|
@ -128,7 +128,7 @@ BaseLoader.prototype = {
|
|||
{
|
||||
if (file.state === CONST.FILE_PENDING && _this.inflight.size < _this.maxParallelDownloads)
|
||||
{
|
||||
console.log('ADDED TO QUEUE:', file.key);
|
||||
// console.log('ADDED TO QUEUE:', file.key);
|
||||
|
||||
_this.inflight.add(file);
|
||||
|
||||
|
@ -150,7 +150,7 @@ BaseLoader.prototype = {
|
|||
// private
|
||||
loadFile: function (file)
|
||||
{
|
||||
console.log('LOADING', file.key);
|
||||
// console.log('LOADING', file.key);
|
||||
|
||||
// If the file doesn't have its own crossOrigin set,
|
||||
// we'll use the Loaders (which is undefined by default)
|
||||
|
@ -164,7 +164,7 @@ BaseLoader.prototype = {
|
|||
|
||||
nextFile: function (previousFile, success)
|
||||
{
|
||||
console.log('LOADED:', previousFile.src, success);
|
||||
// console.log('LOADED:', previousFile.src, success);
|
||||
|
||||
// Move the file that just loaded from the inflight list to the queue or failed Set
|
||||
|
||||
|
@ -181,19 +181,19 @@ BaseLoader.prototype = {
|
|||
|
||||
if (this.list.size > 0)
|
||||
{
|
||||
console.log('nextFile - still something in the list');
|
||||
// console.log('nextFile - still something in the list');
|
||||
this.processLoadQueue();
|
||||
}
|
||||
else if (this.inflight.size === 0)
|
||||
{
|
||||
console.log('nextFile calling finishedLoading');
|
||||
// console.log('nextFile calling finishedLoading');
|
||||
this.finishedLoading();
|
||||
}
|
||||
},
|
||||
|
||||
finishedLoading: function ()
|
||||
{
|
||||
console.log('BaseLoader.finishedLoading PROCESSING');
|
||||
// console.log('BaseLoader.finishedLoading PROCESSING');
|
||||
|
||||
this._state = CONST.LOADER_PROCESSING;
|
||||
|
||||
|
@ -223,9 +223,7 @@ BaseLoader.prototype = {
|
|||
this.inflight.clear();
|
||||
this.queue.clear();
|
||||
|
||||
console.log('Loader Complete. Loaded:', storage.size, 'Failed:', this.failed.size);
|
||||
|
||||
console.log('BaseLoader COMPLETE - dispatching event');
|
||||
// console.log('Loader Complete. Loaded:', storage.size, 'Failed:', this.failed.size);
|
||||
|
||||
this._state = CONST.LOADER_COMPLETE;
|
||||
|
||||
|
|
|
@ -75,8 +75,6 @@ StateManager.prototype = {
|
|||
// this.game.onPause.add(this.pause, this);
|
||||
// this.game.onResume.add(this.resume, this);
|
||||
|
||||
console.log('StateManager.boot');
|
||||
|
||||
for (var i = 0; i < this._pending.length; i++)
|
||||
{
|
||||
var entry = this._pending[i];
|
||||
|
@ -137,7 +135,7 @@ StateManager.prototype = {
|
|||
autoStart: autoStart
|
||||
});
|
||||
|
||||
console.log('StateManager not yet booted, adding to list', this._pending.length);
|
||||
// console.log('StateManager not yet booted, adding to list', this._pending.length);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -148,12 +146,12 @@ StateManager.prototype = {
|
|||
|
||||
if (stateConfig instanceof State)
|
||||
{
|
||||
console.log('StateManager.add from instance', key);
|
||||
// console.log('StateManager.add from instance', key);
|
||||
newState = this.createStateFromInstance(key, stateConfig);
|
||||
}
|
||||
else if (typeof stateConfig === 'object')
|
||||
{
|
||||
console.log('StateManager.add from object', key);
|
||||
// console.log('StateManager.add from object', key);
|
||||
|
||||
stateConfig.key = key;
|
||||
|
||||
|
@ -161,7 +159,7 @@ StateManager.prototype = {
|
|||
}
|
||||
else if (typeof stateConfig === 'function')
|
||||
{
|
||||
console.log('StateManager.add from function', key);
|
||||
// console.log('StateManager.add from function', key);
|
||||
|
||||
newState = this.createStateFromFunction(key, stateConfig);
|
||||
}
|
||||
|
@ -319,7 +317,7 @@ StateManager.prototype = {
|
|||
// if not booted, then put state into a holding pattern
|
||||
if (!this.game.isBooted)
|
||||
{
|
||||
console.log('StateManager not yet booted, setting autoStart on pending list');
|
||||
// console.log('StateManager not yet booted, setting autoStart on pending list');
|
||||
|
||||
for (var i = 0; i < this._pending.length; i++)
|
||||
{
|
||||
|
@ -361,16 +359,13 @@ StateManager.prototype = {
|
|||
// Is the loader empty?
|
||||
if (state.sys.load.list.size === 0)
|
||||
{
|
||||
console.log('Loader: Empty queue');
|
||||
this.startCreate(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('-------------------> Loader: Start');
|
||||
|
||||
// Start the loader going as we have something in the queue
|
||||
|
||||
state.sys.load.events.on('LOADER_COMPLETE_EVENT', this.loadComplete.bind(this));
|
||||
state.sys.load.events.once('LOADER_COMPLETE_EVENT', this.loadComplete.bind(this));
|
||||
|
||||
state.sys.load.start();
|
||||
}
|
||||
|
@ -386,13 +381,8 @@ StateManager.prototype = {
|
|||
|
||||
loadComplete: function (event)
|
||||
{
|
||||
console.log('Loader: Complete');
|
||||
console.log(arguments);
|
||||
|
||||
var state = event.loader.state;
|
||||
|
||||
console.log(state);
|
||||
|
||||
// Make sure to do load-update one last time before state is set to _created
|
||||
|
||||
// Stop doing this ...
|
||||
|
|
Loading…
Reference in a new issue