Cache audio

This commit is contained in:
2025-02-06 22:32:25 +01:00
parent ccb64fc048
commit fb3a59aa59
8 changed files with 173 additions and 67 deletions

View File

@ -124,12 +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 { useSoundComposable } from '@/composables/useSoundComposable'
import { CharacterHairStorage } from '@/storage/storages'
import { useGameStore } from '@/stores/gameStore'
import { onBeforeUnmount, onMounted, ref, watch } from 'vue'
const { playSound } = useGameComposable()
const { playSound } = useSoundComposable()
const gameStore = useGameStore()
const isLoading = ref<boolean>(true)
const characters = ref<CharacterT[]>([])

View File

@ -27,13 +27,13 @@ import Hotkeys from '@/components/game/gui/Hotkeys.vue'
import Hud from '@/components/game/gui/Hud.vue'
import Menu from '@/components/game/gui/Menu.vue'
import Map from '@/components/game/map/Map.vue'
import { useGameComposable } from '@/composables/useGameComposable'
import { useSoundComposable } from '@/composables/useSoundComposable'
import { useGameStore } from '@/stores/gameStore'
import { Game, Scene } from 'phavuer'
import { onMounted } from 'vue'
const gameStore = useGameStore()
const { playSound, stopSound } = useGameComposable()
const { playSound, stopSound } = useSoundComposable()
const gameConfig = {
name: config.name,