forked from noxious/client
forgot to commit
This commit is contained in:
parent
93a6387367
commit
6deb507806
@ -24,25 +24,24 @@ onBeforeMount(() => {
|
||||
// Get map from server
|
||||
serverMapData.value = map;
|
||||
isMapLoaded.value = true;
|
||||
|
||||
map.tiles.forEach((row, y) => row.forEach((tile, x) => layer.putTileAt(tile, x, y)));
|
||||
});
|
||||
});
|
||||
|
||||
const map = ref();
|
||||
const mapData = ();
|
||||
|
||||
|
||||
function loadMap() {
|
||||
|
||||
}
|
||||
|
||||
const isMapLoaded = ref(false);
|
||||
const socket = useSocketStore();
|
||||
const serverMapData = ref([]);
|
||||
const scene = useScene()
|
||||
const tilemapLayer = ref();
|
||||
|
||||
const tilemapLayer = ref();
|
||||
const mapData = new Phaser.Tilemaps.MapData({
|
||||
width: 10,
|
||||
height: 10,
|
||||
tileWidth: config.tile_size.x,
|
||||
tileHeight: config.tile_size.y,
|
||||
orientation: Phaser.Tilemaps.Orientation.ISOMETRIC,
|
||||
format: Phaser.Tilemaps.Formats.ARRAY_2D,
|
||||
});
|
||||
const map = new Phaser.Tilemaps.Tilemap(scene, mapData);
|
||||
const tileset: (Tileset|null) = map.addTilesetImage('default', 'tiles');
|
||||
const layer:TilemapLayer = map.createBlankLayer('layer', tileset, 0, config.tile_size.y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user