mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 06:30:38 +00:00
Update XMLFile.js
This commit is contained in:
parent
8e4ea336c0
commit
aa0d60786f
1 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,7 @@ var ParseXML = require('../../dom/ParseXML');
|
|||
* A single XML File suitable for loading by the Loader.
|
||||
*
|
||||
* These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly.
|
||||
*
|
||||
*
|
||||
* For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml.
|
||||
*
|
||||
* @class XMLFile
|
||||
|
@ -93,7 +93,7 @@ var XMLFile = new Class({
|
|||
* Adds an XML file, or array of XML files, to the current load queue.
|
||||
*
|
||||
* You can call this method from within your Scene's `preload`, along with any other files you wish to load:
|
||||
*
|
||||
*
|
||||
* ```javascript
|
||||
* function preload ()
|
||||
* {
|
||||
|
@ -108,14 +108,14 @@ var XMLFile = new Class({
|
|||
* The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
|
||||
* Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
|
||||
* loaded.
|
||||
*
|
||||
*
|
||||
* The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load.
|
||||
* The key should be unique both in terms of files being loaded and files already present in the XML Cache.
|
||||
* Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
|
||||
* then remove it from the XML Cache first, before loading a new one.
|
||||
*
|
||||
* Instead of passing arguments you can pass a configuration object, such as:
|
||||
*
|
||||
*
|
||||
* ```javascript
|
||||
* this.load.xml({
|
||||
* key: 'wavedata',
|
||||
|
@ -126,7 +126,7 @@ var XMLFile = new Class({
|
|||
* See the documentation for `Phaser.Types.Loader.FileTypes.XMLFileConfig` for more details.
|
||||
*
|
||||
* Once the file has finished loading you can access it from its Cache using its key:
|
||||
*
|
||||
*
|
||||
* ```javascript
|
||||
* this.load.xml('wavedata', 'files/AlienWaveData.xml');
|
||||
* // and later in your game ...
|
||||
|
|
Loading…
Reference in a new issue