Game: Improve gauge

This commit is contained in:
LoveEevee
2020-03-05 18:58:49 +03:00
parent 09c212df8b
commit 41afc2a905
7 changed files with 94 additions and 42 deletions

View File

@@ -42,16 +42,20 @@ class ViewAssets{
var length = this.don.getAnimationLength("gogo")
this.don.setUpdateSpeed(4 / length)
this.don.setAnimation("gogo")
}else if(Math.round(this.controller.getGlobalScore().gauge / 2) - 1 >= 25){
this.don.setAnimationStart(0)
var length = this.don.getAnimationLength("clear")
this.don.setUpdateSpeed(2 / length)
this.don.setAnimation("clear")
}else{
this.don.setAnimationStart(0)
var length = this.don.getAnimationLength("normal")
this.don.setUpdateSpeed(4 / length)
this.don.setAnimation("normal")
var score = this.controller.getGlobalScore()
var cleared = this.controller.game.rules.clearReached(score.gauge)
if(cleared){
this.don.setAnimationStart(0)
var length = this.don.getAnimationLength("clear")
this.don.setUpdateSpeed(2 / length)
this.don.setAnimation("clear")
}else{
this.don.setAnimationStart(0)
var length = this.don.getAnimationLength("normal")
this.don.setUpdateSpeed(4 / length)
this.don.setAnimation("normal")
}
}
}
this.don.addFrames("clear", 30, "don_anim_clear")