Add stopSong
This commit is contained in:
parent
c6b70c3bdd
commit
cdf74e2999
|
@ -90,6 +90,12 @@ export function playSong(name: string) {
|
|||
}
|
||||
}
|
||||
|
||||
export function stopSong() {
|
||||
if (playingSongAudio && !playingSongAudio.paused) {
|
||||
playingSongAudio.pause()
|
||||
}
|
||||
}
|
||||
|
||||
export function playSound(name: string, volume: number): HTMLAudioElement|undefined {
|
||||
if (!enabled) return
|
||||
let s = audioCache.pop()
|
||||
|
|
Loading…
Reference in New Issue
Block a user