1
0
forked from noxious/client

asset mngr stuff

This commit is contained in:
2024-06-29 22:39:22 +02:00
parent 2313a0faea
commit 270b14d8e5
22 changed files with 316 additions and 261 deletions

View File

@ -0,0 +1,20 @@
import { defineStore } from 'pinia'
export const useAssetManagerStore = defineStore('assetManager', {
state: () => ({
tileList: [] as string[],
selectedTile: ''
}),
actions: {
setTileList(tiles: string[]) {
this.tileList = tiles
},
setSelectedTile(tile: string) {
this.selectedTile = tile
},
reset() {
this.tileList = []
this.selectedTile = ''
}
}
})

View File

@ -10,7 +10,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
decorations: [] as number[][],
tool: 'move',
drawMode: 'tile',
selectedTile: null,
selectedTile: '',
selectedWall: null,
selectedDecoration: null,
isSettingsModalShown: false
@ -46,7 +46,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
setDrawMode(mode: string) {
this.drawMode = mode
},
setSelectedTile(tile: any) {
setSelectedTile(tile: string) {
this.selectedTile = tile
},
setSelectedWall(wall: any) {
@ -65,7 +65,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
this.tiles = []
this.tool = 'move'
this.drawMode = 'tile'
this.selectedTile = null
this.selectedTile = ''
this.selectedWall = null
this.selectedDecoration = null
this.isSettingsModalShown = false
@ -77,4 +77,4 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
* Resources:
* https://www.html5gamedevs.com/topic/21908-phaser-is-there-any-tutorial-on-how-to-do-an-isometric-game/
* http://murdochcarpenter.com/isometric-starling-part-i/
*/
*/