Skip to content

Commit 999967c

Browse files
committed
MultiFile has three new internal properties: baseURL, path and prefix which allow them to retain the state of the loader at the time of creation, to be passed on to all child-files. Fix phaserjs#4679.
1 parent f9785d5 commit 999967c

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

src/loader/MultiFile.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,36 @@ var MultiFile = new Class({
104104
*/
105105
this.config = {};
106106

107+
/**
108+
* A reference to the Loaders baseURL at the time this MultiFile was created.
109+
* Used to populate child-files.
110+
*
111+
* @name Phaser.Loader.MultiFile#baseURL
112+
* @type {string}
113+
* @since 3.20.0
114+
*/
115+
this.baseURL = loader.baseURL;
116+
117+
/**
118+
* A reference to the Loaders path at the time this MultiFile was created.
119+
* Used to populate child-files.
120+
*
121+
* @name Phaser.Loader.MultiFile#path
122+
* @type {string}
123+
* @since 3.20.0
124+
*/
125+
this.path = loader.path;
126+
127+
/**
128+
* A reference to the Loaders prefix at the time this MultiFile was created.
129+
* Used to populate child-files.
130+
*
131+
* @name Phaser.Loader.MultiFile#prefix
132+
* @type {string}
133+
* @since 3.20.0
134+
*/
135+
this.prefix = loader.prefix;
136+
107137
// Link the files
108138
for (var i = 0; i < files.length; i++)
109139
{

0 commit comments

Comments
 (0)