19 lines
424 B
Vue
19 lines
424 B
Vue
<script setup lang="ts">
|
|
import goStore from '@/netcode';
|
|
|
|
const players = useState<{ [key: string]: any }>('players')
|
|
|
|
const player = computed(() => Array.from(goStore.players.keys()).sort((k) => {
|
|
if (goStore.self?.uuid === k) {
|
|
return -1
|
|
} else {
|
|
return 1
|
|
}
|
|
}))
|
|
</script>
|
|
|
|
<template>
|
|
<div v-for="k in player">
|
|
<PlayerSlot :player="goStore.players.get(k)!" />
|
|
</div>
|
|
</template> |