A Compressed Texture File suitable for loading by the Loader.
These are created when you use the Phaser.Loader.LoaderPlugin#texture method and are not typically created directly.
For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#texture.
new CompressedTextureFile(loader, key, entry, [xhrSettings])
name | type | arguments | description |
---|---|---|---|
loader | Phaser.Loader.LoaderPlugin |
A reference to the Loader that is responsible for this file. |
|
key | string |
The key to use for this file. |
|
entry | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry |
The compressed texture file entry to load. |
|
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
A reference to the Loaders baseURL at the time this MultiFile was created. Used to populate child-files.
The completion status of this MultiFile.
A storage container for transient data that the loading files need.
The number of files that failed to load.
Array of files that make up this MultiFile.
Unique cache key (unique within its file type)
A reference to the Loader that is going to load this file.
A reference to the Loaders path at the time this MultiFile was created. Used to populate child-files.
The number of files to load.
A reference to the Loaders prefix at the time this MultiFile was created. Used to populate child-files.
The current state of the file. One of the FILE_CONST values.
The file type string for sorting within the Loader.
Adds all of the multi-file entties to their target caches upon successful loading and processing.
Adds this file to its target cache upon successful loading and processing.
Adds another child to this MultiFile, increases the pending count and resets the completion status.
name | type | description |
---|---|---|
files | Phaser.Loader.File |
The File to add to this MultiFile. |
This MultiFile instance.
Destroy this Multi File and any references it holds.
Checks if this MultiFile is ready to process its children or not.
true
if all children of this MultiFile have loaded, otherwise false
.
Called by each File when it finishes loading.
name | type | description |
---|---|---|
file | Phaser.Loader.File |
The File that has completed processing. |
Called by each File that fails to load.
name | type | description |
---|---|---|
file | Phaser.Loader.File |
The File that has failed to load. |
Called once all children of this multi file have been added to their caches and is now ready for deletion from the Loader.
It will emit a filecomplete
event from the LoaderPlugin.