Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
913c0787
Commit
913c0787
authored
Feb 04, 2019
by
Bui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audio overhaul
parent
aaef2637
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
112 additions
and
112 deletions
+112
-112
public/src/js/about.js
public/src/js/about.js
+1
-1
public/src/js/assets.js
public/src/js/assets.js
+61
-61
public/src/js/controller.js
public/src/js/controller.js
+3
-3
public/src/js/game.js
public/src/js/game.js
+5
-5
public/src/js/importsongs.js
public/src/js/importsongs.js
+1
-1
public/src/js/keyboard.js
public/src/js/keyboard.js
+3
-3
public/src/js/loadsong.js
public/src/js/loadsong.js
+3
-3
public/src/js/mekadon.js
public/src/js/mekadon.js
+1
-1
public/src/js/scoresheet.js
public/src/js/scoresheet.js
+8
-8
public/src/js/session.js
public/src/js/session.js
+1
-1
public/src/js/songselect.js
public/src/js/songselect.js
+19
-19
public/src/js/titlescreen.js
public/src/js/titlescreen.js
+3
-3
public/src/js/tutorial.js
public/src/js/tutorial.js
+1
-1
public/src/js/view.js
public/src/js/view.js
+2
-2
No files found.
public/src/js/about.js
View file @
913c0787
...
@@ -53,7 +53,7 @@
...
@@ -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
)
...
...
public/src/js/assets.js
View file @
913c0787
...
@@ -80,76 +80,76 @@ var assets = {
...
@@ -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
"
,
"
se_balloon.wav
"
,
"
renda-meka.ogg
"
,
"
se_gameclear.wav
"
,
"
se_gamefail.wav
"
,
"
combo-50.wav
"
,
"
se_gamefullcombo.wav
"
,
"
combo-100.wav
"
,
"
se_results_countup.wav
"
,
"
combo-200.wav
"
,
"
se_results_crown.wav
"
,
"
combo-300.wav
"
,
"
combo-400.wav
"
,
"
v_combo_50.wav
"
,
"
combo-500.wav
"
,
"
v_combo_100.wav
"
,
"
combo-600.wav
"
,
"
v_combo_200.wav
"
,
"
combo-700.wav
"
,
"
v_combo_300.wav
"
,
"
combo-800.wav
"
,
"
v_combo_400.wav
"
,
"
combo-900.wav
"
,
"
v_combo_500.wav
"
,
"
combo-1000.wav
"
,
"
v_combo_600.wav
"
,
"
combo-1100.wav
"
,
"
v_combo_700.wav
"
,
"
combo-1200.wav
"
,
"
v_combo_800.wav
"
,
"
combo-1300.wav
"
,
"
v_combo_900.wav
"
,
"
combo-1400.wav
"
,
"
v_combo_1000.wav
"
,
"
combo-over1500.wav
"
,
"
v_combo_1100.wav
"
,
"
v_combo_1200.wav
"
,
"
v_combo_1300.wav
"
,
"
v_combo_1400.wav
"
,
"
v_combo_over1500.wav
"
,
"
fullcombo.wav
"
,
"
v_fullcombo.wav
"
,
"
gamefullcombo.wav
"
,
"
v_renda.wav
"
,
"
gameclear.wav
"
,
"
v_results_fullcombo.wav
"
,
"
gamefail.wav
"
,
"
v_results_fullcombo2.wav
"
"
results_fullcombo.ogg
"
,
"
results_fullcombo2.ogg
"
,
"
results_crown.ogg
"
,
"
results_countup.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
"
:
[
...
...
public/src/js/controller.js
View file @
913c0787
...
@@ -125,14 +125,14 @@ class Controller{
...
@@ -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{
...
@@ -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
)
}
}
...
...
public/src/js/game.js
View file @
913c0787
...
@@ -83,8 +83,8 @@ class Game{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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
)
}
}
...
...
public/src/js/importsongs.js
View file @
913c0787
...
@@ -389,7 +389,7 @@
...
@@ -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
)
...
...
public/src/js/keyboard.js
View file @
913c0787
...
@@ -159,7 +159,7 @@ class Keyboard{
...
@@ -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{
...
@@ -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
(
"
n
ote
_
"
+
sound
)
this
.
controller
.
playSound
(
"
n
eiro_1
_
"
+
sound
)
}
}
this
.
keyTime
[
sound
]
=
this
.
keyTime
[
keyCode
]
this
.
keyTime
[
sound
]
=
this
.
keyTime
[
keyCode
]
})
})
...
...
public/src/js/loadsong.js
View file @
913c0787
...
@@ -20,7 +20,7 @@ class LoadSong{
...
@@ -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{
...
@@ -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{
...
@@ -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
(){
...
...
public/src/js/mekadon.js
View file @
913c0787
...
@@ -84,7 +84,7 @@ class Mekadon{
...
@@ -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
"
){
...
...
public/src/js/scoresheet.js
View file @
913c0787
...
@@ -47,7 +47,7 @@ class Scoresheet{
...
@@ -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{
...
@@ -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
[
"
n
ote
_don
"
].
play
()
assets
.
sounds
[
"
n
eiro_1
_don
"
].
play
()
}
}
}
}
toSongsel
(
fromP2
){
toSongsel
(
fromP2
){
...
@@ -115,7 +115,7 @@ class Scoresheet{
...
@@ -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
[
"
n
ote
_don
"
].
play
()
assets
.
sounds
[
"
n
eiro_1
_don
"
].
play
()
}
}
}
}
}
}
...
@@ -646,12 +646,12 @@ class Scoresheet{
...
@@ -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{
...
@@ -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
(
"
n
ote
_don
"
,
p
)
this
.
playSound
(
"
n
eiro_1
_don
"
,
p
)
}
}
}
}
...
...
public/src/js/session.js
View file @
913c0787
...
@@ -57,7 +57,7 @@ class Session{
...
@@ -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
)
...
...
public/src/js/songselect.js
View file @
913c0787
...
@@ -229,7 +229,7 @@ class SongSelect{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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{
...
@@ -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
...
...
public/src/js/titlescreen.js
View file @
913c0787
...
@@ -19,7 +19,7 @@ class Titlescreen{
...
@@ -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{
...
@@ -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{
...
@@ -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
"
)
...
...
public/src/js/tutorial.js
View file @
913c0787
...
@@ -63,7 +63,7 @@ class Tutorial{
...
@@ -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
)
...
...
public/src/js/view.js
View file @
913c0787
...
@@ -1630,10 +1630,10 @@
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment