Feat : add sound when it is your turn
release-tag / release-image (push) Successful in 29s

Closes #63
This commit is contained in:
2024-05-17 14:37:46 +02:00
parent 6c1b3c1367
commit f583fb3122
2 changed files with 11 additions and 1 deletions
+8 -1
View File
@@ -1,10 +1,17 @@
<script setup lang="ts">
import goStore from '~/netcode';
import type { Player } from '~/netcode/Player';
import { playSound } from '~/helpers/audioHelpers';
const current_players = computed<Array<Player>>(() => Array.from(goStore.current_game?.players ?? []).filter(p => p.team === goStore.current_game?.current_turn))
const discard_unwrapped = ref<boolean>(false)
watch(
() => goStore.current_game?.current_turn.uuid,
() => {
if (goStore.current_game?.current_turn?.uuid == goStore.self?.team?.uuid) {
playSound('/sounds/ding.mp3')
}
})
</script>
<template>