WIP zone loading
This commit is contained in:
@ -84,9 +84,9 @@ export function FlattenZoneArray(tiles: string[][]) {
|
||||
return normalArray
|
||||
}
|
||||
|
||||
export async function loadZoneTilesIntoScene(zone: ZoneT, scene: Phaser.Scene) {
|
||||
export async function loadZoneTilesIntoScene(zone_id: number, scene: Phaser.Scene) {
|
||||
// Fetch the list of tiles from the server
|
||||
const tileArray: HttpResponse<AssetDataT[]> = await fetch(config.server_endpoint + '/assets/list_tiles/' + zone.id).then((response) => response.json())
|
||||
const tileArray: HttpResponse<AssetDataT[]> = await fetch(config.server_endpoint + '/assets/list_tiles/' + zone_id).then((response) => response.json())
|
||||
|
||||
// Load each tile into the scene
|
||||
for (const tile of tileArray.data ?? []) {
|
||||
|
Reference in New Issue
Block a user