Added more SFX logic

This commit is contained in:
2025-02-06 21:43:09 +01:00
parent 6383320e8c
commit 12735756d7
5 changed files with 47 additions and 5 deletions

View File

@ -124,10 +124,12 @@
import config from '@/application/config'
import { type CharacterHair, type Character as CharacterT, type Map } from '@/application/types'
import Modal from '@/components/utilities/Modal.vue'
import { useGameComposable } from '@/composables/useGameComposable'
import { CharacterHairStorage } from '@/storage/storages'
import { useGameStore } from '@/stores/gameStore'
import { onBeforeUnmount, onMounted, ref, watch } from 'vue'
const { playSound } = useGameComposable()
const gameStore = useGameStore()
const isLoading = ref<boolean>(true)
const characters = ref<CharacterT[]>([])
@ -179,6 +181,7 @@ watch(selectedCharacterId, (characterId) => {
})
onMounted(async () => {
playSound('/assets/music/intro.mp3')
const characterHairStorage = new CharacterHairStorage()
characterHairs.value = await characterHairStorage.getAll()
})