Merge pull request #705 from codevinsky/Loader-onFileStart

Added OnFileStart signal to loader
This commit is contained in:
Richard Davey 2014-04-14 11:27:32 +01:00
commit 286882b1ee

View file

@ -94,6 +94,12 @@ Phaser.Loader = function (game) {
*/
this.baseURL = '';
/**
* @property {Phaser.Signal} onFileStart - Event signal.
*/
this.onFileStart = new Phaser.Signal();
/**
* @property {Phaser.Signal} onFileComplete - Event signal.
*/
@ -879,6 +885,8 @@ Phaser.Loader.prototype = {
console.warn('Phaser.Loader loadFile invalid index ' + this._fileIndex);
return;
}
this.onFileStart.dispatch(this.progress, this._fileList[this._fileIndex]);
var file = this._fileList[this._fileIndex];
var _this = this;