MultiScriptFile
A Multi Script File suitable for loading by the Loader.
These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly.
For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts.
Constructor
new MultiScriptFile(loader, key, [url], [xhrSettings])
Parameters
| name | type | optional | description |
|---|---|---|---|
| loader | Phaser.Loader.LoaderPlugin | No | A reference to the Loader that is responsible for this file. |
| key | string | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig | No | The key to use for this file, or a file configuration object. |
| url | Array.<string> | Yes | An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array. |
| xhrSettings | Phaser.Types.Loader.XHRSettingsObject | Yes | An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings. |
Scope: static
Extends
Source: src/loader/filetypes/MultiScriptFile.js#L14
Since: 3.17.0
Inherited Methods
From Phaser.Loader.MultiFile:
Public Methods
addToCache
<instance> addToCache()
Description:
Called automatically by the Loader when all files in this MultiFile have finished loading. Creates a <script> element for each loaded file, sets the language to JavaScript, disables deferred execution, populates the element with the response text, and appends it to document.head in the exact order the files were specified. This causes each script to execute immediately in the correct order, preserving any inter-script dependencies.
Source: src/loader/filetypes/MultiScriptFile.js#L80
Since: 3.17.0
Inherited Members
From Phaser.Loader.MultiFile: