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
cd694b39
Commit
cd694b39
authored
Sep 20, 2018
by
Bui
Committed by
GitHub
Sep 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26 from LoveEevee/gogotime
Fix fire animation and dai notes
parents
8f4af0e2
448927ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
27 deletions
+37
-27
public/src/js/game.js
public/src/js/game.js
+18
-18
public/src/js/mekadon.js
public/src/js/mekadon.js
+10
-4
public/src/js/view.js
public/src/js/view.js
+2
-2
public/src/js/viewassets.js
public/src/js/viewassets.js
+7
-3
No files found.
public/src/js/game.js
View file @
cd694b39
...
@@ -18,7 +18,7 @@ class Game{
...
@@ -18,7 +18,7 @@ class Game{
}
}
this
.
HPGain
=
100
/
this
.
songData
.
circles
.
filter
(
circle
=>
{
this
.
HPGain
=
100
/
this
.
songData
.
circles
.
filter
(
circle
=>
{
var
type
=
circle
.
getType
()
var
type
=
circle
.
getType
()
return
type
==
"
don
"
||
type
==
"
ka
"
||
type
==
"
daiDon
"
||
type
==
"
daiKa
"
return
type
==
=
"
don
"
||
type
===
"
ka
"
||
type
===
"
daiDon
"
||
type
=
==
"
daiKa
"
}).
length
}).
length
this
.
paused
=
false
this
.
paused
=
false
this
.
started
=
false
this
.
started
=
false
...
@@ -89,29 +89,29 @@ class Game{
...
@@ -89,29 +89,29 @@ class Game{
}
}
}
}
}
else
if
(
currentTime
>
endTime
){
}
else
if
(
currentTime
>
endTime
){
if
(
drumrollNotes
){
if
(
!
this
.
controller
.
autoPlayEnabled
){
circle
.
updateStatus
(
-
1
)
if
(
drumrollNotes
){
circle
.
played
(
0
)
circle
.
updateStatus
(
-
1
)
this
.
updateCurrentCircle
(
)
circle
.
played
(
0
,
false
)
if
(
this
.
controller
.
multiplayer
==
1
){
this
.
updateCurrentCircle
()
p2
.
send
(
"
drumroll
"
,
{
if
(
this
.
controller
.
multiplayer
===
1
)
{
p
ace
:
(
this
.
getElapsedTime
().
ms
-
circle
.
getMS
())
/
circle
.
timesHit
p
2
.
send
(
"
drumroll
"
,
{
})
pace
:
(
this
.
getElapsedTime
().
ms
-
circle
.
getMS
())
/
circle
.
timesHit
}
})
}
else
{
}
if
(
!
this
.
controller
.
autoPlayEnabled
)
{
}
else
{
circle
.
updateStatus
(
-
1
)
circle
.
updateStatus
(
-
1
)
var
currentScore
=
0
var
currentScore
=
0
circle
.
played
(
currentScore
)
circle
.
played
(
currentScore
,
type
===
"
daiDon
"
||
type
===
"
daiKa
"
)
this
.
controller
.
displayScore
(
currentScore
,
true
)
this
.
controller
.
displayScore
(
currentScore
,
true
)
this
.
updateCurrentCircle
()
this
.
updateCurrentCircle
()
this
.
updateCombo
(
currentScore
)
this
.
updateCombo
(
currentScore
)
this
.
updateGlobalScore
(
currentScore
,
1
)
this
.
updateGlobalScore
(
currentScore
,
1
)
}
if
(
this
.
controller
.
multiplayer
===
1
){
if
(
this
.
controller
.
multiplayer
===
1
)
{
p2
.
send
(
"
note
"
,
{
p2
.
send
(
"
note
"
,
{
score
:
-
1
score
:
-
1
})
}
)
}
}
}
}
}
}
}
...
...
public/src/js/mekadon.js
View file @
cd694b39
...
@@ -8,9 +8,15 @@ class Mekadon{
...
@@ -8,9 +8,15 @@ class Mekadon{
}
}
play
(
circle
){
play
(
circle
){
var
type
=
circle
.
getType
()
var
type
=
circle
.
getType
()
if
(
type
==
"
balloon
"
){
if
((
type
===
"
balloon
"
||
type
===
"
drumroll
"
||
type
===
"
daiDrumroll
"
)
&&
this
.
getMS
()
>
circle
.
getEndTime
()){
circle
.
updateStatus
(
-
1
)
circle
.
played
(
0
,
false
)
this
.
game
.
updateCurrentCircle
()
}
type
=
circle
.
getType
()
if
(
type
===
"
balloon
"
){
this
.
playDrumrollAt
(
circle
,
0
,
30
)
this
.
playDrumrollAt
(
circle
,
0
,
30
)
}
else
if
(
type
==
"
drumroll
"
||
type
==
"
daiDrumroll
"
){
}
else
if
(
type
==
=
"
drumroll
"
||
type
=
==
"
daiDrumroll
"
){
this
.
playDrumrollAt
(
circle
,
0
,
60
)
this
.
playDrumrollAt
(
circle
,
0
,
60
)
}
else
{
}
else
{
this
.
playAt
(
circle
,
0
,
450
)
this
.
playAt
(
circle
,
0
,
450
)
...
@@ -59,12 +65,12 @@ class Mekadon{
...
@@ -59,12 +65,12 @@ class Mekadon{
this
.
setKey
(
this
.
lr
?
kbd
[
"
ka_l
"
]
:
kbd
[
"
ka_r
"
])
this
.
setKey
(
this
.
lr
?
kbd
[
"
ka_l
"
]
:
kbd
[
"
ka_r
"
])
this
.
lr
=
!
this
.
lr
this
.
lr
=
!
this
.
lr
}
}
if
(
type
==
"
balloon
"
){
if
(
type
==
=
"
balloon
"
){
if
(
circle
.
requiredHits
==
1
){
if
(
circle
.
requiredHits
==
1
){
assets
.
sounds
[
"
balloon
"
].
play
()
assets
.
sounds
[
"
balloon
"
].
play
()
}
}
this
.
game
.
checkBalloon
(
circle
)
this
.
game
.
checkBalloon
(
circle
)
}
else
if
(
type
==
"
drumroll
"
||
type
==
"
daiDrumroll
"
){
}
else
if
(
type
==
=
"
drumroll
"
||
type
=
==
"
daiDrumroll
"
){
this
.
game
.
checkDrumroll
(
circle
)
this
.
game
.
checkDrumroll
(
circle
)
}
else
{
}
else
{
if
(
typeof
score
==
"
undefined
"
){
if
(
typeof
score
==
"
undefined
"
){
...
...
public/src/js/view.js
View file @
cd694b39
...
@@ -31,7 +31,7 @@ class View{
...
@@ -31,7 +31,7 @@ class View{
this
.
currentScore
=
0
this
.
currentScore
=
0
this
.
special
=
""
this
.
special
=
""
this
.
scoreDispCount
=
-
1
this
.
scoreDispCount
=
-
1
this
.
scoreOpacity
=
1
.0
this
.
scoreOpacity
=
1
this
.
lastMeasure
=
0
this
.
lastMeasure
=
0
this
.
currentTimingPoint
=
0
this
.
currentTimingPoint
=
0
...
@@ -418,7 +418,7 @@ class View{
...
@@ -418,7 +418,7 @@ class View{
var
timeForDistance
=
this
.
posToMs
(
this
.
distanceForCircle
+
this
.
bigCircleSize
/
2
,
speed
)
var
timeForDistance
=
this
.
posToMs
(
this
.
distanceForCircle
+
this
.
bigCircleSize
/
2
,
speed
)
var
startingTime
=
circle
.
getMS
()
-
timeForDistance
var
startingTime
=
circle
.
getMS
()
-
timeForDistance
var
finishTime
=
circle
.
getEndTime
()
+
this
.
posToMs
(
this
.
slotX
-
this
.
taikoSquareW
+
this
.
bigCircleSize
/
2
,
speed
)
var
finishTime
=
circle
.
getEndTime
()
+
this
.
posToMs
(
this
.
slotX
-
this
.
taikoSquareW
+
this
.
bigCircleSize
*
3
,
speed
)
if
(
!
circle
.
getPlayed
()
||
circle
.
getScore
()
===
0
){
if
(
!
circle
.
getPlayed
()
||
circle
.
getScore
()
===
0
){
if
(
ms
>=
startingTime
&&
ms
<=
finishTime
){
if
(
ms
>=
startingTime
&&
ms
<=
finishTime
){
...
...
public/src/js/viewassets.js
View file @
cd694b39
...
@@ -54,9 +54,12 @@ class ViewAssets{
...
@@ -54,9 +54,12 @@ class ViewAssets{
var
imgh
=
370
var
imgh
=
370
var
scale
=
175
var
scale
=
175
var
ms
=
this
.
controller
.
getElapsedTime
().
ms
var
ms
=
this
.
controller
.
getElapsedTime
().
ms
var
grow
=
Math
.
min
(
100
,
ms
-
this
.
view
.
gogoTimeStarted
)
/
100
var
elapsed
=
ms
-
this
.
view
.
gogoTimeStarted
if
(
!
this
.
view
.
gogoTime
){
if
(
this
.
view
.
gogoTime
){
grow
=
1
-
grow
var
grow
=
3
-
Math
.
min
(
200
,
elapsed
)
/
100
this
.
ctx
.
globalAlpha
=
Math
.
min
(
200
,
elapsed
)
/
200
}
else
{
var
grow
=
1
-
Math
.
min
(
100
,
elapsed
)
/
100
}
}
var
w
=
(
this
.
view
.
barH
*
imgw
)
/
scale
*
grow
var
w
=
(
this
.
view
.
barH
*
imgw
)
/
scale
*
grow
var
h
=
(
this
.
view
.
barH
*
imgh
)
/
scale
*
grow
var
h
=
(
this
.
view
.
barH
*
imgh
)
/
scale
*
grow
...
@@ -72,6 +75,7 @@ class ViewAssets{
...
@@ -72,6 +75,7 @@ class ViewAssets{
h
:
h
,
h
:
h
,
callback
:
()
=>
{
callback
:
()
=>
{
this
.
ctx
.
globalCompositeOperation
=
"
source-over
"
this
.
ctx
.
globalCompositeOperation
=
"
source-over
"
this
.
ctx
.
globalAlpha
=
1
}
}
}
}
})
})
...
...
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