1
0
forked from noxious/client

Almost finalised refactoring

This commit is contained in:
2025-01-03 14:35:08 +01:00
parent 145143cdc5
commit 700bd57e67
29 changed files with 264 additions and 273 deletions

View File

@ -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)
}