forked from noxious/client
asset mngr stuff
This commit is contained in:
20
src/stores/assetManager.ts
Normal file
20
src/stores/assetManager.ts
Normal 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 = ''
|
||||
}
|
||||
}
|
||||
})
|
@ -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/
|
||||
*/
|
||||
*/
|
||||
|
Reference in New Issue
Block a user