diff --git a/examples/3.80/loading-assets-with-json-pack/README.md b/examples/3.80/loading-assets-with-json-pack/README.md index 89da66c..fbf8334 100644 --- a/examples/3.80/loading-assets-with-json-pack/README.md +++ b/examples/3.80/loading-assets-with-json-pack/README.md @@ -2,12 +2,18 @@ Contains example code of how you can use the built in [Phaser 3 Pack Loader](https://newdocs.phaser.io/docs/3.80.0/focus/Phaser.Loader.LoaderPlugin-pack) to load your various asset files from one central JSON file. This can help you keep your code and config isolated. -Contains example code of how you can use the built in Phaser 3 Arcade Physics Engine to create a conveyor belt like game object that will move objects automatically, and modify their speed when the objects are moving. - -You can see a live demo of the example here: [Phaser 3 Asset Loading via Pack Loader Demo](https://devshareacademy.github.io/phaser-3-typescript-games-and-examples/examples/arcade-physics-conveyor-belt/index.html) +You can see a live demo of the example here: [Phaser 3 Asset Loading via Pack Loader Demo](https://devshareacademy.github.io/phaser-3-typescript-games-and-examples/examples/loading-assets-with-json-pack/index.html) ![Example](./docs/example.png?raw=true) +By using the JSON file for loading assets, your `preload` code can go from this: + +![Example 1](./docs/example1.png?raw=true) + +to this: + +![Example 2](./docs/example2.png?raw=true) + ## Local Development ### Requirements diff --git a/examples/3.80/loading-assets-with-json-pack/docs/example1.png b/examples/3.80/loading-assets-with-json-pack/docs/example1.png new file mode 100644 index 0000000..176a6a6 Binary files /dev/null and b/examples/3.80/loading-assets-with-json-pack/docs/example1.png differ diff --git a/examples/3.80/loading-assets-with-json-pack/docs/example2.png b/examples/3.80/loading-assets-with-json-pack/docs/example2.png new file mode 100644 index 0000000..605640a Binary files /dev/null and b/examples/3.80/loading-assets-with-json-pack/docs/example2.png differ diff --git a/examples/3.80/loading-assets-with-json-pack/src/main.ts b/examples/3.80/loading-assets-with-json-pack/src/main.ts index 906a68a..de80cb6 100644 --- a/examples/3.80/loading-assets-with-json-pack/src/main.ts +++ b/examples/3.80/loading-assets-with-json-pack/src/main.ts @@ -49,6 +49,7 @@ export class Game extends Phaser.Scene { // this.load.setPath('assets/audio/xDeviruchi'); // this.load.audio('title_theme', 'Title-Theme.wav'); + // uncomment this line and comment out code above for example // asset pack example // this.load.pack('asset_pack', 'assets/data/assets.json'); }