Skip to content
Snippets Groups Projects
Commit 49c2a9b3 authored by syuilo's avatar syuilo
Browse files

ボリュームが0のときサウンドを鳴らさないように

parent b378cabf
No related branches found
No related tags found
No related merge requests found
......@@ -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`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment