Skip to content

Commit 9b7d6d0

Browse files
committed
Added linkFile support back in, so images can bind to other data.
1 parent 97dd683 commit 9b7d6d0

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

src/loader/File.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,27 @@ var File = new Class({
223223
*
224224
* @name Phaser.Loader.File#multiFile
225225
* @type {?Phaser.Loader.MultiFile}
226-
* @since 3.0.0
226+
* @since 3.7.0
227227
*/
228228
this.multiFile;
229+
230+
/**
231+
* Does this file have an associated linked file? Such as an image and a normal map.
232+
* Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't
233+
* actually bound by data, where-as a linkFile is.
234+
*
235+
* @name Phaser.Loader.File#linkFile
236+
* @type {?Phaser.Loader.File}
237+
* @since 3.7.0
238+
*/
239+
this.linkFile;
240+
},
241+
242+
setLink: function (fileB)
243+
{
244+
this.linkFile = fileB;
245+
246+
fileB.linkFile = this;
229247
},
230248

231249
/**
@@ -451,6 +469,7 @@ var File = new Class({
451469
this.cache = null;
452470
this.xhrSettings = null;
453471
this.multiFile = null;
472+
this.linkFile = null;
454473
this.data = null;
455474
}
456475

0 commit comments

Comments
 (0)