worked on mp logic

This commit is contained in:
2024-05-04 15:03:29 +02:00
parent 1a5b5e92d4
commit 8c21cd11c7
13 changed files with 165 additions and 80 deletions

View File

@ -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
View 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;
},
}
});