Playtest
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user