japanese-drum-game/public/src/js/gamerules.js

25 lines
471 B
JavaScript
Raw Normal View History

2018-09-22 04:31:35 +08:00
class GameRules{
constructor(game){
this.difficulty = game.controller.selectedSong.difficulty
var frame = 1000 / 60
switch(this.difficulty){
case "easy":
case "normal":
this.good = 5 / 2 * frame
this.ok = 13 / 2 * frame
this.bad = 15 / 2 * frame
break
case "hard":
case "oni":
2018-10-13 02:04:28 +08:00
case "ura":
2018-09-22 04:31:35 +08:00
this.good = 3 / 2 * frame
this.ok = 9 / 2 * frame
this.bad = 13 / 2 * frame
break
}
this.daiLeniency = 2 * frame
}
}