Feat : create functionb hooks for winner and loser screens
release-tag / release-image (push) Successful in 28s
release-tag / release-image (push) Successful in 28s
Related to #49
This commit is contained in:
@@ -12,6 +12,30 @@ watch(
|
|||||||
playSound('/sounds/ding.mp3')
|
playSound('/sounds/ding.mp3')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => goStore.current_game?.losers,
|
||||||
|
() => {
|
||||||
|
if (goStore.self?.uuid && goStore.current_game?.losers && goStore.current_game.losers.includes(goStore.self.uuid)) {
|
||||||
|
showLoserScreen()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => goStore.current_game?.ended,
|
||||||
|
() => {
|
||||||
|
if (goStore.current_game?.ended && goStore.self?.uuid && goStore.current_game?.losers && !goStore.current_game.losers.includes(goStore.self.uuid)) {
|
||||||
|
showWinnerScreen()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function showLoserScreen() {
|
||||||
|
// playSound('/sounds/ding.mp3')
|
||||||
|
}
|
||||||
|
|
||||||
|
function showWinnerScreen() {
|
||||||
|
// playSound('/sounds/ding.mp3')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export interface GameNetcode extends GameObjectNetcode {
|
|||||||
started: boolean
|
started: boolean
|
||||||
current_turn: string
|
current_turn: string
|
||||||
players: Array<string>
|
players: Array<string>
|
||||||
|
losers: Array<string>
|
||||||
ended: boolean
|
ended: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user