1
0
forked from noxious/client

Work for teleports

This commit is contained in:
2024-08-23 20:15:58 +02:00
parent 43d5e0614e
commit ad096d4ce3
13 changed files with 303 additions and 168 deletions

View File

@ -23,7 +23,7 @@ export function tileToWorldX(layer: Phaser.Tilemaps.TilemapLayer, pos_x: number,
return worldPoint.x + config.tile_size.x / 2
}
export function tileToWorldY(layer: Phaser.Tilemaps.TilemapLayer, pos_x: number, pos_y: number): number {
export function tileToWorldY(layer: TilemapLayer, pos_x: number, pos_y: number): number {
const worldPoint = layer.tileToWorldXY(pos_x, pos_y)
return worldPoint.y + config.tile_size.y * 1.5
}
@ -86,8 +86,8 @@ export const updateZoneTiles = (zoneTilemap: Tilemap, tiles: Phaser.Tilemaps.Til
}
// Update the tilemap with any new 'blank_tile' entries
zoneTiles.forEach((row: any, y: number) => {
row.forEach((tileId, x) => {
zoneTiles.forEach((row: any, y: any) => {
row.forEach((tileId: any, x: any) => {
placeTile(zoneTilemap, tiles, x, y, tileId)
})
})