diff --git a/public/assets/audio/bgm_settings.mp3 b/public/assets/audio/bgm_settings.mp3 new file mode 100644 index 0000000..e09d492 Binary files /dev/null and b/public/assets/audio/bgm_settings.mp3 differ diff --git a/public/src/js/assets.js b/public/src/js/assets.js index aaab4b5..80b46f3 100644 --- a/public/src/js/assets.js +++ b/public/src/js/assets.js @@ -151,7 +151,8 @@ var assets = { "audioMusic": [ "bgm_songsel.mp3", "bgm_result.mp3", - "bgm_setsume.mp3" + "bgm_setsume.mp3", + "bgm_settings.mp3" ], "fonts": [ "Kozuka", diff --git a/public/src/js/settings.js b/public/src/js/settings.js index b4e477e..1f83c01 100644 --- a/public/src/js/settings.js +++ b/public/src/js/settings.js @@ -53,6 +53,8 @@ class SettingsView{ constructor(touchEnabled){ this.touchEnabled = touchEnabled loader.changePage("settings", true) + assets.sounds["bgm_settings"].playLoop(0.1, false, 0, 1.392, 26.992) + this.endButton = document.getElementById("tutorial-end-button") if(touchEnabled){ document.getElementById("tutorial-outer").classList.add("touch-enabled") @@ -141,6 +143,7 @@ class SettingsView{ settings.setItem(name, value) this.selected = this.items.findIndex(item => item.id === name) this.items[this.selected].valueDiv.innerText = this.getValue(name) + assets.sounds["se_ka"].play() } keyEvent(event){ if(event.keyCode === 27 || event.keyCode === 8 || event.keyCode === 9){ @@ -171,6 +174,7 @@ class SettingsView{ selected.settingBox.classList.remove("selected") this.selected = this.mod(this.items.length, this.selected + (name === "next" ? 1 : -1)) this.items[this.selected].settingBox.classList.add("selected") + assets.sounds["se_ka"].play() }else if(name === "back"){ this.onEnd() } @@ -192,6 +196,7 @@ class SettingsView{ } clean(){ this.gamepad.clean() + assets.sounds["bgm_settings"].stop() pageEvents.keyRemove(this, "all") for(var i in this.items){ pageEvents.remove(this.items[i].settingBox, ["mousedown", "touchstart"])