1
0
forked from noxious/client

TS improvements

This commit is contained in:
2025-01-04 19:17:10 +01:00
parent 700bd57e67
commit 10f6dc3802
3 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import type { MapCharacter, mapLoadData } from '@/application/types'
import type { MapCharacter, mapLoadData, UUID } from '@/application/types'
import Characters from '@/components/game/map/Characters.vue'
import MapObjects from '@/components/game/map/MapObjects.vue'
import MapTiles from '@/components/game/map/MapTiles.vue'
@ -40,11 +40,11 @@ gameStore.connection?.on('map:character:join', async (data: MapCharacter) => {
mapStore.addCharacter(data)
})
gameStore.connection?.on('map:character:leave', (characterId: number) => {
gameStore.connection?.on('map:character:leave', (characterId: UUID) => {
mapStore.removeCharacter(characterId)
})
gameStore.connection?.on('map:character:move', (data: { characterId: number; positionX: number; positionY: number; rotation: number; isMoving: boolean }) => {
gameStore.connection?.on('map:character:move', (data: { characterId: UUID; positionX: number; positionY: number; rotation: number; isMoving: boolean }) => {
mapStore.updateCharacterPosition(data)
})
</script>