1
0
forked from noxious/client

Moved map character network event logic into characters component, added playAnimation function to characterComposable, finished attack animation

This commit is contained in:
2025-02-05 18:27:33 +01:00
parent 0c9a41c286
commit 6c7864b4d4
5 changed files with 66 additions and 29 deletions

View File

@ -27,7 +27,7 @@ export const useMapStore = defineStore('map', {
addCharacter(character: MapCharacter) {
this.characters.push(character)
},
updateCharacterProperty<K extends keyof MapCharacter>(characterId: UUID, property: K, value: MapCharacter[K]) {
updateCharacterProperty<K extends keyof MapCharacter>(characterId: string, property: K, value: MapCharacter[K]) {
const character = this.characters.find((char) => char.character.id === characterId)
if (character) {
character[property] = value