added paint feature

This commit is contained in:
2024-07-04 12:40:46 +02:00
parent 2fe6f8d9c0
commit 90121be472
4 changed files with 31 additions and 23 deletions

View File

@ -6,7 +6,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
name: '',
width: 10,
height: 10,
tiles: [] as number[][],
tiles: [] as string[][],
objects: [] as number[][],
tool: 'move',
drawMode: 'tile',
@ -27,10 +27,10 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
setHeight(height: number) {
this.height = height
},
setTiles(tiles: number[][]) {
setTiles(tiles: string[][]) {
this.tiles = tiles
},
updateTile(x: number, y: number, tile: number) {
updateTile(x: number, y: number, tile: string) {
this.tiles[y][x] = tile
},
setObjects(objects: number[][]) {