mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
ボリュームが0のときサウンドを鳴らさないように
This commit is contained in:
parent
032ca34f0b
commit
4637839e30
1 changed files with 1 additions and 0 deletions
|
@ -190,6 +190,7 @@ os.init(async () => {
|
|||
(vm as any).focus();
|
||||
},
|
||||
sound(type: string) {
|
||||
if (this.$store.state.device.sfxVolume === 0) return;
|
||||
const sound = this.$store.state.device['sfx' + type.substr(0, 1).toUpperCase() + type.substr(1)];
|
||||
if (sound == null) return;
|
||||
const audio = new Audio(`/assets/sounds/${sound}.mp3`);
|
||||
|
|
Loading…
Reference in a new issue