Fix Go-Go Time animation speed

This commit is contained in:
LoveEevee
2018-09-20 16:11:19 +03:00
parent e3af27f23c
commit f8b81a9795
2 changed files with 28 additions and 25 deletions

View File

@@ -714,6 +714,7 @@ class View{
toggleGogoTime(circle){
this.gogoTime = circle.gogoTime
this.gogoTimeStarted = circle.ms
if(this.gogoTime){
this.assets.fireworks.forEach(fireworksAsset => {
fireworksAsset.setAnimation("normal")
@@ -726,24 +727,18 @@ class View{
this.assets.fire.setAnimation("normal")
var don = this.assets.don
don.setAnimation("gogostart")
don.setAnimationStart(circle.ms)
var length = don.getAnimationLength("gogo")
don.setUpdateSpeed(this.beatInterval / (length / 4))
var start = circle.ms - (circle.ms % this.beatInterval)
don.setAnimationStart(start)
var length = don.getAnimationLength("gogostart")
don.setAnimationEnd(circle.ms + length * don.speed, () => {
don.setAnimationStart(0)
if(this.gogoTime){
don.setAnimation("gogo")
}else{
don.setAnimation("normal")
}
})
don.setAnimationEnd(start + length * don.speed, don.normalAnimation)
}
}
drawGogoTime(){
var ms = this.controller.getElapsedTime().ms
if(this.gogoTime){
if(this.gogoTimeStarted){
}
var circles = this.controller.parsedSongData.circles
var lastCircle = circles[circles.length - 1]
var endTime = lastCircle.getEndTime() + 3000
@@ -755,7 +750,7 @@ class View{
}
}else{
if(this.assets.don.getAnimation() === "gogo"){
this.assets.don.setAnimation("normal")
this.assets.don.normalAnimation()
}
if(ms >= this.gogoTimeStarted + 100){
this.assets.fire.setAnimation(false)
@@ -776,14 +771,7 @@ class View{
var ms = this.controller.getElapsedTime().ms
don.setAnimationStart(ms)
var length = don.getAnimationLength("10combo")
don.setAnimationEnd(ms + length * don.speed, () => {
don.setAnimationStart(0)
if(this.gogoTime){
don.setAnimation("gogo")
}else{
don.setAnimation("normal")
}
})
don.setAnimationEnd(ms + length * don.speed, don.normalAnimation)
}
}
onmousemove(event){