mirror of
https://github.com/yuukiwww/taiko-web.git
synced 2024-10-22 17:05:49 +02:00
audio overhaul
This commit is contained in:
parent
aaef2637fc
commit
913c0787ef
@ -53,7 +53,7 @@
|
|||||||
touched = true
|
touched = true
|
||||||
}
|
}
|
||||||
this.clean()
|
this.clean()
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
localStorage.setItem("tutorial", "true")
|
localStorage.setItem("tutorial", "true")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new SongSelect("about", false, touched)
|
new SongSelect("about", false, touched)
|
||||||
|
@ -80,76 +80,76 @@ var assets = {
|
|||||||
"results_tetsuohana.png"
|
"results_tetsuohana.png"
|
||||||
],
|
],
|
||||||
"audioSfx": [
|
"audioSfx": [
|
||||||
"don.wav",
|
"se_cancel.wav",
|
||||||
"ka.wav",
|
"se_don.wav",
|
||||||
"start.wav",
|
"se_ka.wav",
|
||||||
|
"se_pause.wav",
|
||||||
|
|
||||||
"combo-50-meka.wav",
|
"v_combo_50_meka.wav",
|
||||||
"combo-100-meka.wav",
|
"v_combo_100_meka.wav",
|
||||||
"combo-200-meka.wav",
|
"v_combo_200_meka.wav",
|
||||||
"combo-300-meka.wav",
|
"v_combo_300_meka.wav",
|
||||||
"combo-400-meka.wav",
|
"v_combo_400_meka.wav",
|
||||||
"combo-500-meka.wav",
|
"v_combo_500_meka.wav",
|
||||||
"combo-600-meka.wav",
|
"v_combo_600_meka.wav",
|
||||||
"combo-700-meka.wav",
|
"v_combo_700_meka.wav",
|
||||||
"combo-800-meka.wav",
|
"v_combo_800_meka.wav",
|
||||||
"combo-900-meka.wav",
|
"v_combo_900_meka.wav",
|
||||||
"combo-1000-meka.wav",
|
"v_combo_1000_meka.wav",
|
||||||
"combo-1100-meka.wav",
|
"v_combo_1100_meka.wav",
|
||||||
"combo-1200-meka.wav",
|
"v_combo_1200_meka.wav",
|
||||||
"combo-1300-meka.wav",
|
"v_combo_1300_meka.wav",
|
||||||
"combo-1400-meka.wav",
|
"v_combo_1400_meka.wav",
|
||||||
"combo-over1500-meka.wav",
|
"v_combo_over1500_meka.wav",
|
||||||
"fullcombo-meka.wav",
|
|
||||||
|
|
||||||
"song-select.wav",
|
"v_fullcombo_meka.wav",
|
||||||
"title.ogg",
|
"v_renda_meka.wav",
|
||||||
"pause.wav",
|
"v_results.wav",
|
||||||
"cancel.wav",
|
"v_sanka.wav",
|
||||||
"results.ogg",
|
"v_songsel.wav",
|
||||||
"sanka.wav"
|
"v_start.wav",
|
||||||
|
"v_title.wav"
|
||||||
],
|
],
|
||||||
"audioSfxLR": [
|
"audioSfxLR": [
|
||||||
"note_don.ogg",
|
"neiro_1_don.wav",
|
||||||
"note_ka.ogg",
|
"neiro_1_ka.wav",
|
||||||
"balloon.ogg",
|
|
||||||
"renda.ogg",
|
|
||||||
"renda-meka.ogg",
|
|
||||||
|
|
||||||
"combo-50.wav",
|
"se_balloon.wav",
|
||||||
"combo-100.wav",
|
"se_gameclear.wav",
|
||||||
"combo-200.wav",
|
"se_gamefail.wav",
|
||||||
"combo-300.wav",
|
"se_gamefullcombo.wav",
|
||||||
"combo-400.wav",
|
"se_results_countup.wav",
|
||||||
"combo-500.wav",
|
"se_results_crown.wav",
|
||||||
"combo-600.wav",
|
|
||||||
"combo-700.wav",
|
|
||||||
"combo-800.wav",
|
|
||||||
"combo-900.wav",
|
|
||||||
"combo-1000.wav",
|
|
||||||
"combo-1100.wav",
|
|
||||||
"combo-1200.wav",
|
|
||||||
"combo-1300.wav",
|
|
||||||
"combo-1400.wav",
|
|
||||||
"combo-over1500.wav",
|
|
||||||
|
|
||||||
"fullcombo.wav",
|
"v_combo_50.wav",
|
||||||
"gamefullcombo.wav",
|
"v_combo_100.wav",
|
||||||
"gameclear.wav",
|
"v_combo_200.wav",
|
||||||
"gamefail.wav",
|
"v_combo_300.wav",
|
||||||
|
"v_combo_400.wav",
|
||||||
|
"v_combo_500.wav",
|
||||||
|
"v_combo_600.wav",
|
||||||
|
"v_combo_700.wav",
|
||||||
|
"v_combo_800.wav",
|
||||||
|
"v_combo_900.wav",
|
||||||
|
"v_combo_1000.wav",
|
||||||
|
"v_combo_1100.wav",
|
||||||
|
"v_combo_1200.wav",
|
||||||
|
"v_combo_1300.wav",
|
||||||
|
"v_combo_1400.wav",
|
||||||
|
"v_combo_over1500.wav",
|
||||||
|
|
||||||
"results_fullcombo.ogg",
|
"v_fullcombo.wav",
|
||||||
"results_fullcombo2.ogg",
|
"v_renda.wav",
|
||||||
"results_crown.ogg",
|
"v_results_fullcombo.wav",
|
||||||
"results_countup.wav"
|
"v_results_fullcombo2.wav"
|
||||||
],
|
],
|
||||||
"audioSfxLoud": [
|
"audioSfxLoud": [
|
||||||
"diffsel.wav"
|
"v_diffsel.wav"
|
||||||
],
|
],
|
||||||
"audioMusic": [
|
"audioMusic": [
|
||||||
"bgm_songsel.ogg",
|
"bgm_songsel.mp3",
|
||||||
"bgm_result.ogg",
|
"bgm_result.mp3",
|
||||||
"bgm_setsume.ogg"
|
"bgm_setsume.mp3"
|
||||||
],
|
],
|
||||||
"audioOgg": "note_ka.ogg",
|
"audioOgg": "note_ka.ogg",
|
||||||
"fonts": [
|
"fonts": [
|
||||||
|
@ -125,14 +125,14 @@ class Controller{
|
|||||||
if(Math.round(score.gauge / 2) - 1 >= 25){
|
if(Math.round(score.gauge / 2) - 1 >= 25){
|
||||||
if(score.bad === 0){
|
if(score.bad === 0){
|
||||||
vp = "fullcombo"
|
vp = "fullcombo"
|
||||||
this.playSoundMeka("fullcombo", 1.350)
|
this.playSoundMeka("v_fullcombo", 1.350)
|
||||||
}else{
|
}else{
|
||||||
vp = "clear"
|
vp = "clear"
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
vp = "fail"
|
vp = "fail"
|
||||||
}
|
}
|
||||||
this.playSound("game" + vp)
|
this.playSound("se_game" + vp)
|
||||||
}
|
}
|
||||||
displayResults(){
|
displayResults(){
|
||||||
if(this.multiplayer !== 2){
|
if(this.multiplayer !== 2){
|
||||||
@ -167,7 +167,7 @@ class Controller{
|
|||||||
playSoundMeka(soundID, time){
|
playSoundMeka(soundID, time){
|
||||||
var meka = ""
|
var meka = ""
|
||||||
if(this.autoPlayEnabled && !this.multiplayer){
|
if(this.autoPlayEnabled && !this.multiplayer){
|
||||||
meka = "-meka"
|
meka = "_meka"
|
||||||
}
|
}
|
||||||
this.playSound(soundID + meka, time)
|
this.playSound(soundID + meka, time)
|
||||||
}
|
}
|
||||||
|
@ -83,8 +83,8 @@ class Game{
|
|||||||
if(drumrollNotes && !circle.rendaPlayed && ms < endTime){
|
if(drumrollNotes && !circle.rendaPlayed && ms < endTime){
|
||||||
circle.rendaPlayed = true
|
circle.rendaPlayed = true
|
||||||
if(this.rules.difficulty === "easy"){
|
if(this.rules.difficulty === "easy"){
|
||||||
assets.sounds["renda" + this.controller.snd].stop()
|
assets.sounds["v_renda" + this.controller.snd].stop()
|
||||||
this.controller.playSoundMeka("renda")
|
this.controller.playSoundMeka("v_renda")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!circle.beatMSCopied){
|
if(!circle.beatMSCopied){
|
||||||
@ -353,7 +353,7 @@ class Game{
|
|||||||
}
|
}
|
||||||
togglePause(){
|
togglePause(){
|
||||||
if(!this.paused){
|
if(!this.paused){
|
||||||
assets.sounds["pause"].play()
|
assets.sounds["se_pause"].play()
|
||||||
this.paused = true
|
this.paused = true
|
||||||
this.latestDate = Date.now()
|
this.latestDate = Date.now()
|
||||||
this.mainAsset.stop()
|
this.mainAsset.stop()
|
||||||
@ -363,7 +363,7 @@ class Game{
|
|||||||
this.view.lastMousemove = this.view.getMS()
|
this.view.lastMousemove = this.view.getMS()
|
||||||
this.view.cursorHidden = false
|
this.view.cursorHidden = false
|
||||||
}else{
|
}else{
|
||||||
assets.sounds["cancel"].play()
|
assets.sounds["se_cancel"].play()
|
||||||
this.paused = false
|
this.paused = false
|
||||||
var currentDate = Date.now()
|
var currentDate = Date.now()
|
||||||
this.startDate += currentDate - this.latestDate
|
this.startDate += currentDate - this.latestDate
|
||||||
@ -422,7 +422,7 @@ class Game{
|
|||||||
this.globalScore.maxCombo = this.combo
|
this.globalScore.maxCombo = this.combo
|
||||||
}
|
}
|
||||||
if(this.combo === 50 || this.combo > 0 && this.combo % 100 === 0 && this.combo < 1500 || this.combo > 0 && this.combo % 500 === 0){
|
if(this.combo === 50 || this.combo > 0 && this.combo % 100 === 0 && this.combo < 1500 || this.combo > 0 && this.combo % 500 === 0){
|
||||||
this.controller.playSoundMeka("combo-" + (this.combo <= 1400 ? this.combo : "over1500"))
|
this.controller.playSoundMeka("v_combo_" + (this.combo <= 1400 ? this.combo : "over1500"))
|
||||||
}
|
}
|
||||||
this.view.updateCombo(this.combo)
|
this.view.updateCombo(this.combo)
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@
|
|||||||
assets.songs = this.songs
|
assets.songs = this.songs
|
||||||
assets.customSongs = true
|
assets.customSongs = true
|
||||||
assets.customSelected = 0
|
assets.customSelected = 0
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.songSelect.clean()
|
this.songSelect.clean()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loader.screen.removeChild(this.loaderDiv)
|
loader.screen.removeChild(this.loaderDiv)
|
||||||
|
@ -159,7 +159,7 @@ class Keyboard{
|
|||||||
this.checkKey(this.kbd["don_l"], "menu", moveMenuConfirm)
|
this.checkKey(this.kbd["don_l"], "menu", moveMenuConfirm)
|
||||||
this.checkKey(this.kbd["don_r"], "menu", moveMenuConfirm)
|
this.checkKey(this.kbd["don_r"], "menu", moveMenuConfirm)
|
||||||
if(moveMenu && this.game.isPaused()){
|
if(moveMenu && this.game.isPaused()){
|
||||||
assets.sounds["ka"].play()
|
assets.sounds["se_ka"].play()
|
||||||
this.controller.view.pauseMove(moveMenu)
|
this.controller.view.pauseMove(moveMenu)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,9 +190,9 @@ class Keyboard{
|
|||||||
&& circle.getType() === "balloon"
|
&& circle.getType() === "balloon"
|
||||||
&& circle.requiredHits - circle.timesHit <= 1
|
&& circle.requiredHits - circle.timesHit <= 1
|
||||||
){
|
){
|
||||||
this.controller.playSound("balloon")
|
this.controller.playSound("se_balloon")
|
||||||
}else{
|
}else{
|
||||||
this.controller.playSound("note_" + sound)
|
this.controller.playSound("neiro_1_" + sound)
|
||||||
}
|
}
|
||||||
this.keyTime[sound] = this.keyTime[keyCode]
|
this.keyTime[sound] = this.keyTime[keyCode]
|
||||||
})
|
})
|
||||||
|
@ -20,7 +20,7 @@ class LoadSong{
|
|||||||
var song = this.selectedSong
|
var song = this.selectedSong
|
||||||
var id = song.folder
|
var id = song.folder
|
||||||
var promises = []
|
var promises = []
|
||||||
assets.sounds["start"].play()
|
assets.sounds["v_start"].play()
|
||||||
|
|
||||||
song.songBg = this.randInt(1, 5)
|
song.songBg = this.randInt(1, 5)
|
||||||
song.songStage = this.randInt(1, 3)
|
song.songStage = this.randInt(1, 3)
|
||||||
@ -263,7 +263,7 @@ class LoadSong{
|
|||||||
p2.send("gamestart")
|
p2.send("gamestart")
|
||||||
}else{
|
}else{
|
||||||
if(!repeat){
|
if(!repeat){
|
||||||
assets.sounds["sanka"].play()
|
assets.sounds["v_sanka"].play()
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.startMultiplayer(true)
|
this.startMultiplayer(true)
|
||||||
@ -279,7 +279,7 @@ class LoadSong{
|
|||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
}
|
}
|
||||||
p2.send("leave")
|
p2.send("leave")
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.cancelButton.style.pointerEvents = "none"
|
this.cancelButton.style.pointerEvents = "none"
|
||||||
}
|
}
|
||||||
clean(){
|
clean(){
|
||||||
|
@ -84,7 +84,7 @@ class Mekadon{
|
|||||||
}
|
}
|
||||||
if(type === "balloon"){
|
if(type === "balloon"){
|
||||||
if(circle.requiredHits == 1){
|
if(circle.requiredHits == 1){
|
||||||
assets.sounds["balloon"].play()
|
assets.sounds["se_balloon"].play()
|
||||||
}
|
}
|
||||||
this.game.checkBalloon(circle)
|
this.game.checkBalloon(circle)
|
||||||
}else if(type === "drumroll" || type === "daiDrumroll"){
|
}else if(type === "drumroll" || type === "daiDrumroll"){
|
||||||
|
@ -47,7 +47,7 @@ class Scoresheet{
|
|||||||
this.redrawBind = this.redraw.bind(this)
|
this.redrawBind = this.redraw.bind(this)
|
||||||
this.redraw()
|
this.redraw()
|
||||||
|
|
||||||
assets.sounds["results"].play()
|
assets.sounds["v_results"].play()
|
||||||
assets.sounds["bgm_result"].playLoop(3, false, 0, 0.847, 17.689)
|
assets.sounds["bgm_result"].playLoop(3, false, 0, 0.847, 17.689)
|
||||||
|
|
||||||
if(p2.session){
|
if(p2.session){
|
||||||
@ -106,7 +106,7 @@ class Scoresheet{
|
|||||||
if(!p2.session){
|
if(!p2.session){
|
||||||
this.state.screen = "scoresShown"
|
this.state.screen = "scoresShown"
|
||||||
this.state.screenMS = this.getMS()
|
this.state.screenMS = this.getMS()
|
||||||
assets.sounds["note_don"].play()
|
assets.sounds["neiro_1_don"].play()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toSongsel(fromP2){
|
toSongsel(fromP2){
|
||||||
@ -115,7 +115,7 @@ class Scoresheet{
|
|||||||
this.state.screen = "fadeOut"
|
this.state.screen = "fadeOut"
|
||||||
this.state.screenMS = this.getMS()
|
this.state.screenMS = this.getMS()
|
||||||
if(!fromP2){
|
if(!fromP2){
|
||||||
assets.sounds["note_don"].play()
|
assets.sounds["neiro_1_don"].play()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -646,12 +646,12 @@ class Scoresheet{
|
|||||||
if(this.state.screen === "fadeIn" && elapsed >= 1200 && !this.state["fullcomboPlayed" + p]){
|
if(this.state.screen === "fadeIn" && elapsed >= 1200 && !this.state["fullcomboPlayed" + p]){
|
||||||
this.state["fullcomboPlayed" + p] = true
|
this.state["fullcomboPlayed" + p] = true
|
||||||
if(crownType === "gold"){
|
if(crownType === "gold"){
|
||||||
this.playSound("results_fullcombo" + (p === 1 ? "2" : ""), p)
|
this.playSound("v_results_fullcombo" + (p === 1 ? "2" : ""), p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.state.screen === "fadeIn" && elapsed >= 1650 && !this.state["crownPlayed" + p]){
|
if(this.state.screen === "fadeIn" && elapsed >= 1650 && !this.state["crownPlayed" + p]){
|
||||||
this.state["crownPlayed" + p] = true
|
this.state["crownPlayed" + p] = true
|
||||||
this.playSound("results_crown", p)
|
this.playSound("se_results_crown", p)
|
||||||
}
|
}
|
||||||
this.draw.crown({
|
this.draw.crown({
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
@ -759,13 +759,13 @@ class Scoresheet{
|
|||||||
if(this.state.countupShown){
|
if(this.state.countupShown){
|
||||||
if(!this.state["countup" + p]){
|
if(!this.state["countup" + p]){
|
||||||
this.state["countup" + p] = true
|
this.state["countup" + p] = true
|
||||||
this.loopSound("results_countup", p, [0.1, false, 0, 0, 0.07])
|
this.loopSound("se_results_countup", p, [0.1, false, 0, 0, 0.07])
|
||||||
}
|
}
|
||||||
}else if(this.state["countup" + p]){
|
}else if(this.state["countup" + p]){
|
||||||
this.state["countup" + p] = false
|
this.state["countup" + p] = false
|
||||||
this.stopSound("results_countup", p)
|
this.stopSound("se_results_countup", p)
|
||||||
if(this.state.screen === "fadeIn"){
|
if(this.state.screen === "fadeIn"){
|
||||||
this.playSound("note_don", p)
|
this.playSound("neiro_1_don", p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class Session{
|
|||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
}
|
}
|
||||||
this.clean()
|
this.clean()
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new SongSelect(false, false, this.touchEnabled)
|
new SongSelect(false, false, this.touchEnabled)
|
||||||
}, 500)
|
}, 500)
|
||||||
|
@ -229,7 +229,7 @@ class SongSelect{
|
|||||||
}else if((!p2.session || fadeIn) && "selectedSong" in localStorage){
|
}else if((!p2.session || fadeIn) && "selectedSong" in localStorage){
|
||||||
this.selectedSong = Math.min(Math.max(0, localStorage["selectedSong"] |0), this.songs.length - 1)
|
this.selectedSong = Math.min(Math.max(0, localStorage["selectedSong"] |0), this.songs.length - 1)
|
||||||
}
|
}
|
||||||
assets.sounds["song-select"].play()
|
assets.sounds["v_songsel"].play()
|
||||||
snd.musicGain.fadeOut()
|
snd.musicGain.fadeOut()
|
||||||
this.playBgm(false)
|
this.playBgm(false)
|
||||||
}
|
}
|
||||||
@ -420,7 +420,7 @@ class SongSelect{
|
|||||||
this.toOptions(1)
|
this.toOptions(1)
|
||||||
}else if(moveBy === this.diffOptions.length + 4){
|
}else if(moveBy === this.diffOptions.length + 4){
|
||||||
this.state.ura = !this.state.ura
|
this.state.ura = !this.state.ura
|
||||||
assets.sounds["ka"].play()
|
assets.sounds["se_ka"].play()
|
||||||
if(this.selectedDiff === this.diffOptions.length + 4 && !this.state.ura){
|
if(this.selectedDiff === this.diffOptions.length + 4 && !this.state.ura){
|
||||||
this.state.move = -1
|
this.state.move = -1
|
||||||
}
|
}
|
||||||
@ -546,7 +546,7 @@ class SongSelect{
|
|||||||
var soundsDelay = Math.abs((scroll + resize) / moveBy)
|
var soundsDelay = Math.abs((scroll + resize) / moveBy)
|
||||||
|
|
||||||
for(var i = 0; i < Math.abs(moveBy) - 1; i++){
|
for(var i = 0; i < Math.abs(moveBy) - 1; i++){
|
||||||
assets.sounds["ka"].play((resize + i * soundsDelay) / 1000)
|
assets.sounds["se_ka"].play((resize + i * soundsDelay) / 1000)
|
||||||
}
|
}
|
||||||
this.pointer(false)
|
this.pointer(false)
|
||||||
}
|
}
|
||||||
@ -556,7 +556,7 @@ class SongSelect{
|
|||||||
this.state.move = moveBy
|
this.state.move = moveBy
|
||||||
this.state.moveMS = this.getMS() - 500
|
this.state.moveMS = this.getMS() - 500
|
||||||
this.state.locked = 1
|
this.state.locked = 1
|
||||||
assets.sounds["ka"].play()
|
assets.sounds["se_ka"].play()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -587,14 +587,14 @@ class SongSelect{
|
|||||||
this.selectedDiff = this.diffOptions.length + 3
|
this.selectedDiff = this.diffOptions.length + 3
|
||||||
}
|
}
|
||||||
|
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
assets.sounds["song-select"].stop()
|
assets.sounds["v_songsel"].stop()
|
||||||
assets.sounds["diffsel"].play(0.3)
|
assets.sounds["v_diffsel"].play(0.3)
|
||||||
}else if(currentSong.action === "back"){
|
}else if(currentSong.action === "back"){
|
||||||
this.clean()
|
this.clean()
|
||||||
this.toTitleScreen()
|
this.toTitleScreen()
|
||||||
}else if(currentSong.action === "random"){
|
}else if(currentSong.action === "random"){
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.state.locked = true
|
this.state.locked = true
|
||||||
do{
|
do{
|
||||||
var i = Math.floor(Math.random() * this.songs.length)
|
var i = Math.floor(Math.random() * this.songs.length)
|
||||||
@ -627,15 +627,15 @@ class SongSelect{
|
|||||||
this.state.locked = true
|
this.state.locked = true
|
||||||
this.state.moveHover = null
|
this.state.moveHover = null
|
||||||
|
|
||||||
assets.sounds["diffsel"].stop()
|
assets.sounds["v_diffsel"].stop()
|
||||||
assets.sounds["cancel"].play()
|
assets.sounds["se_cancel"].play()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toLoadSong(difficulty, shift, ctrl, touch){
|
toLoadSong(difficulty, shift, ctrl, touch){
|
||||||
this.clean()
|
this.clean()
|
||||||
var selectedSong = this.songs[this.selectedSong]
|
var selectedSong = this.songs[this.selectedSong]
|
||||||
assets.sounds["diffsel"].stop()
|
assets.sounds["v_diffsel"].stop()
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
|
|
||||||
try{
|
try{
|
||||||
if(assets.customSongs){
|
if(assets.customSongs){
|
||||||
@ -673,7 +673,7 @@ class SongSelect{
|
|||||||
}
|
}
|
||||||
toOptions(moveBy){
|
toOptions(moveBy){
|
||||||
if(!p2.session){
|
if(!p2.session){
|
||||||
assets.sounds["ka"].play()
|
assets.sounds["se_ka"].play()
|
||||||
this.selectedDiff = 1
|
this.selectedDiff = 1
|
||||||
do{
|
do{
|
||||||
this.state.options = this.mod(this.optionsList.length, this.state.options + moveBy)
|
this.state.options = this.mod(this.optionsList.length, this.state.options + moveBy)
|
||||||
@ -682,7 +682,7 @@ class SongSelect{
|
|||||||
}
|
}
|
||||||
toTitleScreen(){
|
toTitleScreen(){
|
||||||
if(!p2.session){
|
if(!p2.session){
|
||||||
assets.sounds["cancel"].play()
|
assets.sounds["se_cancel"].play()
|
||||||
this.clean()
|
this.clean()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new Titlescreen()
|
new Titlescreen()
|
||||||
@ -690,14 +690,14 @@ class SongSelect{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
toTutorial(){
|
toTutorial(){
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.clean()
|
this.clean()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new Tutorial(true)
|
new Tutorial(true)
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
toAbout(){
|
toAbout(){
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.clean()
|
this.clean()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new About(this.touchEnabled)
|
new About(this.touchEnabled)
|
||||||
@ -712,7 +712,7 @@ class SongSelect{
|
|||||||
}else{
|
}else{
|
||||||
localStorage["selectedSong"] = this.selectedSong
|
localStorage["selectedSong"] = this.selectedSong
|
||||||
|
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.clean()
|
this.clean()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new Session(this.touchEnabled)
|
new Session(this.touchEnabled)
|
||||||
@ -723,7 +723,7 @@ class SongSelect{
|
|||||||
if(assets.customSongs){
|
if(assets.customSongs){
|
||||||
assets.customSongs = false
|
assets.customSongs = false
|
||||||
assets.songs = assets.songsDefault
|
assets.songs = assets.songsDefault
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.clean()
|
this.clean()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new SongSelect("browse", false, this.touchEnabled)
|
new SongSelect("browse", false, this.touchEnabled)
|
||||||
@ -951,7 +951,7 @@ class SongSelect{
|
|||||||
var scroll = resize2 - resize - scrollDelay * 2
|
var scroll = resize2 - resize - scrollDelay * 2
|
||||||
var elapsed = ms - this.state.moveMS
|
var elapsed = ms - this.state.moveMS
|
||||||
if(this.state.move && ms > this.state.moveMS + resize2 - scrollDelay){
|
if(this.state.move && ms > this.state.moveMS + resize2 - scrollDelay){
|
||||||
assets.sounds["ka"].play()
|
assets.sounds["se_ka"].play()
|
||||||
this.selectedSong = this.mod(this.songs.length, this.selectedSong + this.state.move)
|
this.selectedSong = this.mod(this.songs.length, this.selectedSong + this.state.move)
|
||||||
this.state.move = 0
|
this.state.move = 0
|
||||||
this.state.locked = 2
|
this.state.locked = 2
|
||||||
|
@ -19,7 +19,7 @@ class Titlescreen{
|
|||||||
pageEvents.add(this.titleScreen, ["mousedown", "touchstart"], this.onPressed.bind(this))
|
pageEvents.add(this.titleScreen, ["mousedown", "touchstart"], this.onPressed.bind(this))
|
||||||
pageEvents.add(this.langDropdown, "change", this.langChange.bind(this))
|
pageEvents.add(this.langDropdown, "change", this.langChange.bind(this))
|
||||||
|
|
||||||
assets.sounds["title"].play()
|
assets.sounds["v_title"].play()
|
||||||
this.gamepad = new Gamepad({
|
this.gamepad = new Gamepad({
|
||||||
"13": ["a", "b", "x", "y", "start", "ls", "rs"]
|
"13": ["a", "b", "x", "y", "start", "ls", "rs"]
|
||||||
}, pressed => {
|
}, pressed => {
|
||||||
@ -59,7 +59,7 @@ class Titlescreen{
|
|||||||
}
|
}
|
||||||
this.titleScreen.style.cursor = "auto"
|
this.titleScreen.style.cursor = "auto"
|
||||||
this.clean()
|
this.clean()
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
this.goNext()
|
this.goNext()
|
||||||
}
|
}
|
||||||
goNext(fromP2){
|
goNext(fromP2){
|
||||||
@ -133,7 +133,7 @@ class Titlescreen{
|
|||||||
clean(){
|
clean(){
|
||||||
this.gamepad.clean()
|
this.gamepad.clean()
|
||||||
this.logo.clean()
|
this.logo.clean()
|
||||||
assets.sounds["title"].stop()
|
assets.sounds["v_title"].stop()
|
||||||
pageEvents.keyRemove(this, "all")
|
pageEvents.keyRemove(this, "all")
|
||||||
pageEvents.remove(this.titleScreen, ["mousedown", "touchstart"])
|
pageEvents.remove(this.titleScreen, ["mousedown", "touchstart"])
|
||||||
pageEvents.remove(this.langDropdown, "change")
|
pageEvents.remove(this.langDropdown, "change")
|
||||||
|
@ -63,7 +63,7 @@ class Tutorial{
|
|||||||
touched = true
|
touched = true
|
||||||
}
|
}
|
||||||
this.clean()
|
this.clean()
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
localStorage.setItem("tutorial", "true")
|
localStorage.setItem("tutorial", "true")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
new SongSelect(this.fromSongSel ? "tutorial" : false, false, touched)
|
new SongSelect(this.fromSongSel ? "tutorial" : false, false, touched)
|
||||||
|
@ -1630,10 +1630,10 @@
|
|||||||
}
|
}
|
||||||
switch(pos){
|
switch(pos){
|
||||||
case 1:
|
case 1:
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
return this.controller.restartSong()
|
return this.controller.restartSong()
|
||||||
case 2:
|
case 2:
|
||||||
assets.sounds["don"].play()
|
assets.sounds["se_don"].play()
|
||||||
return this.controller.songSelection()
|
return this.controller.songSelection()
|
||||||
default:
|
default:
|
||||||
return this.controller.togglePause()
|
return this.controller.togglePause()
|
||||||
|
Loading…
Reference in New Issue
Block a user