forked from noxious/client
i dont even remember, something, something, zone editor
This commit is contained in:
@ -23,3 +23,15 @@ export function tileToWorldXY(layer: Phaser.Tilemaps.TilemapLayer, pos_x: number
|
||||
|
||||
return { position_x, position_y }
|
||||
}
|
||||
|
||||
export function generateTilemap(scene: Phaser.Scene, width: number, height: number, ) {
|
||||
const zoneData = new Phaser.Tilemaps.MapData({
|
||||
width: width, // @TODO : get this from the server
|
||||
height: height, // @TODO : get this from the server
|
||||
tileWidth: config.tile_size.x,
|
||||
tileHeight: config.tile_size.y,
|
||||
orientation: Phaser.Tilemaps.Orientation.ISOMETRIC,
|
||||
format: Phaser.Tilemaps.Formats.ARRAY_2D
|
||||
})
|
||||
return new Phaser.Tilemaps.Tilemap(scene, zoneData);
|
||||
}
|
Reference in New Issue
Block a user