Added code comment
This commit is contained in:
parent
f75528b2af
commit
5128aa83f9
@ -79,6 +79,10 @@ function preloadScene(scene: Phaser.Scene) {
|
|||||||
scene.load.image('blank_tile', '/assets/zone/blank_tile.png')
|
scene.load.image('blank_tile', '/assets/zone/blank_tile.png')
|
||||||
scene.load.image('waypoint', '/assets/waypoint.png')
|
scene.load.image('waypoint', '/assets/waypoint.png')
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We're using rex-await-loader to load assets asynchronously
|
||||||
|
* Phaser does not support this out of the box, so we're using this plugin
|
||||||
|
*/
|
||||||
scene.load.rexAwait(async function (successCallback) {
|
scene.load.rexAwait(async function (successCallback) {
|
||||||
await assetManager.getAssetsByGroup('tiles').then((assets) => {
|
await assetManager.getAssetsByGroup('tiles').then((assets) => {
|
||||||
assets.forEach((asset) => {
|
assets.forEach((asset) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user