Started working on improved connect method
This commit is contained in:
parent
744df2e2dc
commit
8c664d7774
@ -29,7 +29,6 @@
|
||||
<div class="py-6 px-8 h-[calc(100%_-_48px)] flex flex-col items-center gap-6 justify-center" v-if="selectedCharacterId">
|
||||
<input class="input-field w-[158px]" type="text" name="name" :placeholder="characters.find((c) => c.id == selectedCharacterId)?.name" />
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
s
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="bg-[url('/assets/ui-elements/character-select-ui-shape.svg')] w-[190px] h-52 bg-no-repeat bg-center flex items-center justify-between">
|
||||
<button class="ml-6 w-4 h-8 p-0">
|
||||
@ -179,10 +178,8 @@ function loginWithCharacter() {
|
||||
gameStore.connection?.emit('character:connect', {
|
||||
characterId: selectedCharacterId.value,
|
||||
characterHairId: selectedHairId.value
|
||||
})
|
||||
gameStore.connection?.on('character:connect', (data: CharacterT) => {
|
||||
console.log(data)
|
||||
gameStore.setCharacter(data)
|
||||
}, (response: { character: CharacterT }) => {
|
||||
gameStore.setCharacter(response.character)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user