forked from noxious/client
Almost finalised refactoring
This commit is contained in:
@ -72,8 +72,9 @@ const preloadScene = async (scene: Phaser.Scene) => {
|
||||
* Then load them into the scene.
|
||||
*/
|
||||
scene.load.rexAwait(async function (successCallback: any) {
|
||||
const tiles: AssetDataT[] = await fetch(config.server_endpoint + '/assets/list_tiles').then((response) => response.json())
|
||||
for await (const tile of tiles) {
|
||||
const tiles: { data: AssetDataT[] } = await fetch(config.server_endpoint + '/assets/list_tiles').then((response) => response.json())
|
||||
|
||||
for await (const tile of tiles?.data ?? []) {
|
||||
await loadTexture(scene, tile)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user