forked from noxious/client
worked on mp logic
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import Map from '@/engine/Map/Map'
|
||||
|
||||
export const useMapStore = defineStore('map', {
|
||||
state: () => ({
|
||||
map: null as Map | null,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
setMap(map: Map) {
|
||||
this.map = map;
|
||||
}
|
||||
}
|
||||
});
|
14
src/stores/player.ts
Normal file
14
src/stores/player.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import Player from '@/engine/Player/Player'
|
||||
|
||||
export const usePlayerStore = defineStore('player', {
|
||||
state: () => ({
|
||||
player: null as Player | null,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
setPlayer(player: Player) {
|
||||
this.player = player;
|
||||
},
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user