mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
Merge pull request #705 from codevinsky/Loader-onFileStart
Added OnFileStart signal to loader
This commit is contained in:
commit
286882b1ee
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue