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
fa818ad3
Commit
fa818ad3
authored
Sep 26, 2018
by
LoveEevee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add clear and endclear animations
parent
8226123c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
13 deletions
+32
-13
public/src/css/songselect.css
public/src/css/songselect.css
+3
-10
public/src/js/assets.js
public/src/js/assets.js
+2
-0
public/src/js/controller.js
public/src/js/controller.js
+1
-0
public/src/js/game.js
public/src/js/game.js
+1
-1
public/src/js/view.js
public/src/js/view.js
+16
-1
public/src/js/viewassets.js
public/src/js/viewassets.js
+9
-1
No files found.
public/src/css/songselect.css
View file @
fa818ad3
@-webkit-keyframes
bgscroll
{
from
{
background-position
:
0
0
;
}
to
{
background-position
:
-200px
0
;
}
}
@keyframes
bgscroll
{
@keyframes
bgscroll
{
from
{
from
{
background-position
:
0
0
;
background-position
:
0
0
;
}
}
to
{
to
{
background-position
:
-
200px
0
;
background-position
:
-
30vmin
0
;
}
}
}
}
#song-select
{
#song-select
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background
:
url("/assets/img/bg-pattern-1.png")
;
background
:
url("/assets/img/bg-pattern-1.png")
;
animation
:
bgscroll
3s
infinite
linear
;
background-size
:
30vmin
;
animation
:
bgscroll
8s
infinite
linear
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
#song-container
{
#song-container
{
...
...
public/src/js/assets.js
View file @
fa818ad3
...
@@ -31,6 +31,8 @@ var assets = {
...
@@ -31,6 +31,8 @@ var assets = {
"
don_anim_10combo.png
"
,
"
don_anim_10combo.png
"
,
"
don_anim_gogo.png
"
,
"
don_anim_gogo.png
"
,
"
don_anim_gogostart.png
"
,
"
don_anim_gogostart.png
"
,
"
don_anim_clear.png
"
,
"
don_anim_endclear.png
"
,
"
fire_anim.png
"
,
"
fire_anim.png
"
,
"
fireworks_anim.png
"
"
fireworks_anim.png
"
],
],
...
...
public/src/js/controller.js
View file @
fa818ad3
...
@@ -107,6 +107,7 @@ class Controller{
...
@@ -107,6 +107,7 @@ class Controller{
this
.
view
.
togglePauseMenu
()
this
.
view
.
togglePauseMenu
()
}
}
gameEnded
(){
gameEnded
(){
this
.
view
.
gameEnded
()
var
score
=
this
.
getGlobalScore
()
var
score
=
this
.
getGlobalScore
()
var
vp
var
vp
if
(
score
.
fail
===
0
){
if
(
score
.
fail
===
0
){
...
...
public/src/js/game.js
View file @
fa818ad3
...
@@ -281,7 +281,7 @@ class Game{
...
@@ -281,7 +281,7 @@ class Game{
var
ms
=
this
.
getElapsedTime
().
ms
var
ms
=
this
.
getElapsedTime
().
ms
if
(
this
.
musicFadeOut
===
0
){
if
(
this
.
musicFadeOut
===
0
){
if
(
this
.
controller
.
multiplayer
===
1
){
if
(
this
.
controller
.
multiplayer
===
1
){
p2
.
send
(
"
gameresults
"
,
this
.
controller
.
getGlobalScore
())
p2
.
send
(
"
gameresults
"
,
this
.
getGlobalScore
())
}
}
this
.
musicFadeOut
++
this
.
musicFadeOut
++
}
else
if
(
this
.
musicFadeOut
===
1
&&
ms
>=
started
+
1600
){
}
else
if
(
this
.
musicFadeOut
===
1
&&
ms
>=
started
+
1600
){
...
...
public/src/js/view.js
View file @
fa818ad3
...
@@ -749,7 +749,8 @@ class View{
...
@@ -749,7 +749,8 @@ class View{
})
})
}
}
}
else
{
}
else
{
if
(
this
.
assets
.
don
.
getAnimation
()
===
"
gogo
"
){
var
animation
=
this
.
assets
.
don
.
getAnimation
()
if
(
animation
===
"
gogo
"
||
this
.
controller
.
getGlobalScore
().
hp
>=
50
&&
animation
===
"
normal
"
){
this
.
assets
.
don
.
normalAnimation
()
this
.
assets
.
don
.
normalAnimation
()
}
}
if
(
ms
>=
this
.
gogoTimeStarted
+
100
){
if
(
ms
>=
this
.
gogoTimeStarted
+
100
){
...
@@ -770,10 +771,24 @@ class View{
...
@@ -770,10 +771,24 @@ class View{
don
.
setAnimation
(
"
10combo
"
)
don
.
setAnimation
(
"
10combo
"
)
var
ms
=
this
.
controller
.
getElapsedTime
().
ms
var
ms
=
this
.
controller
.
getElapsedTime
().
ms
don
.
setAnimationStart
(
ms
)
don
.
setAnimationStart
(
ms
)
var
length
=
don
.
getAnimationLength
(
"
normal
"
)
don
.
setUpdateSpeed
(
this
.
beatInterval
/
(
length
/
4
))
var
length
=
don
.
getAnimationLength
(
"
10combo
"
)
var
length
=
don
.
getAnimationLength
(
"
10combo
"
)
don
.
setAnimationEnd
(
ms
+
length
*
don
.
speed
,
don
.
normalAnimation
)
don
.
setAnimationEnd
(
ms
+
length
*
don
.
speed
,
don
.
normalAnimation
)
}
}
}
}
gameEnded
(){
if
(
this
.
controller
.
getGlobalScore
().
hp
>=
50
){
var
don
=
this
.
assets
.
don
don
.
setAnimation
(
"
endclear
"
)
var
ms
=
this
.
controller
.
getElapsedTime
().
ms
don
.
setAnimationStart
(
ms
)
var
length
=
don
.
getAnimationLength
(
"
normal
"
)
don
.
setUpdateSpeed
(
this
.
beatInterval
/
(
length
/
4
))
var
length
=
don
.
getAnimationLength
(
"
endclear
"
)
don
.
setAnimationEnd
(
ms
+
length
*
don
.
speed
,
don
.
normalAnimation
)
}
}
onmousemove
(
event
){
onmousemove
(
event
){
this
.
lastMousemove
=
this
.
controller
.
getElapsedTime
().
ms
this
.
lastMousemove
=
this
.
controller
.
getElapsedTime
().
ms
this
.
cursorHidden
=
false
this
.
cursorHidden
=
false
...
...
public/src/js/viewassets.js
View file @
fa818ad3
...
@@ -42,12 +42,20 @@ class ViewAssets{
...
@@ -42,12 +42,20 @@ class ViewAssets{
var
length
=
this
.
don
.
getAnimationLength
(
"
gogo
"
)
var
length
=
this
.
don
.
getAnimationLength
(
"
gogo
"
)
this
.
don
.
setUpdateSpeed
(
this
.
beatInterval
/
(
length
/
4
))
this
.
don
.
setUpdateSpeed
(
this
.
beatInterval
/
(
length
/
4
))
this
.
don
.
setAnimation
(
"
gogo
"
)
this
.
don
.
setAnimation
(
"
gogo
"
)
}
else
if
(
this
.
controller
.
getGlobalScore
().
hp
>=
50
){
this
.
don
.
setAnimationStart
(
0
)
var
length
=
this
.
don
.
getAnimationLength
(
"
clear
"
)
this
.
don
.
setUpdateSpeed
(
this
.
beatInterval
/
(
length
/
2
))
this
.
don
.
setAnimation
(
"
clear
"
)
}
else
{
}
else
{
this
.
don
.
setAnimationStart
(
0
)
this
.
don
.
setAnimationStart
(
0
)
this
.
don
.
setUpdateSpeed
(
this
.
beatInterval
/
16
)
var
length
=
this
.
don
.
getAnimationLength
(
"
normal
"
)
this
.
don
.
setUpdateSpeed
(
this
.
beatInterval
/
(
length
/
4
))
this
.
don
.
setAnimation
(
"
normal
"
)
this
.
don
.
setAnimation
(
"
normal
"
)
}
}
}
}
this
.
don
.
addFrames
(
"
clear
"
,
30
,
"
don_anim_clear
"
)
this
.
don
.
addFrames
(
"
endclear
"
,
22
,
"
don_anim_endclear
"
)
this
.
don
.
normalAnimation
()
this
.
don
.
normalAnimation
()
this
.
fire
=
this
.
createAsset
(
"
bar
"
,
frame
=>
{
this
.
fire
=
this
.
createAsset
(
"
bar
"
,
frame
=>
{
var
imgw
=
360
var
imgw
=
360
...
...
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