forked from noxious/client
Global const for composable
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
export function useGameComposable() {
|
||||
const activeSounds: { [key: string]: HTMLAudioElement } = {}
|
||||
const activeSounds: { [key: string]: HTMLAudioElement } = {}
|
||||
|
||||
export function useGameComposable() {
|
||||
const playSound = (sound: string, loop: boolean = false, ignoreIfPlaying: boolean = false) => {
|
||||
// If sound is already playing and we want to ignore
|
||||
if (ignoreIfPlaying && activeSounds[sound] && !activeSounds[sound].paused) {
|
||||
|
Reference in New Issue
Block a user