This commit is contained in:
2024-04-26 16:08:04 +02:00
parent 6e9077404a
commit d0816f9fc9
9 changed files with 169 additions and 65 deletions
+10 -2
View File
@@ -2,10 +2,18 @@
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="[i, p] in goStore.players">
<PlayerSlot :player="p" />
<div v-for="k in player">
<PlayerSlot :player="goStore.players.get(k)!" />
</div>
</template>