debug
This commit is contained in:
parent
f873bc9cb2
commit
24f8e86c20
|
|
@ -13,6 +13,15 @@ const player = usePlayerStore()
|
||||||
const game = useGameStore()
|
const game = useGameStore()
|
||||||
const bot = useBotStore()
|
const bot = useBotStore()
|
||||||
|
|
||||||
|
game.$reset()
|
||||||
|
bot.$reset()
|
||||||
|
localStorage.removeItem('game')
|
||||||
|
localStorage.removeItem('bot')
|
||||||
|
|
||||||
|
const websocket = useWebsocketStore()
|
||||||
|
if (player.id == null) player.initPlayer()
|
||||||
|
websocket.init(route.params.gameId)
|
||||||
|
|
||||||
const join = () => {
|
const join = () => {
|
||||||
res = websocket.send({
|
res = websocket.send({
|
||||||
action: 'join',
|
action: 'join',
|
||||||
|
|
@ -28,16 +37,6 @@ onBeforeMount(() => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
game.$reset()
|
|
||||||
bot.$reset()
|
|
||||||
localStorage.removeItem('game')
|
|
||||||
localStorage.removeItem('bot')
|
|
||||||
|
|
||||||
const websocket = useWebsocketStore()
|
|
||||||
if (player.id == null) player.initPlayer()
|
|
||||||
websocket.init(route.params.gameId)
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user