PraseTja: Add branches

- Needs the following changes to the database: change `easy`, `normal`, `hard`, and `oni` to `TEXT` type
- When adding songs to the database and if, for example, a song's 7-star difficulty has a branch, instead of `7` input `7 B`, this is to display song's branch support on the song selection
- Branch can be forced in debug
This commit is contained in:
LoveEevee
2019-02-17 19:26:46 +03:00
parent 440436b38c
commit 03b9326733
17 changed files with 445 additions and 193 deletions

View File

@@ -1,6 +1,5 @@
class Circle{
constructor(config){
// id, ms, type, text, speed, endTime, requiredHits
this.id = config.id
this.ms = config.start
this.originalMS = this.ms
@@ -23,38 +22,13 @@ class Circle{
this.gogoChecked = false
this.beatMS = config.beatMS
this.fixedPos = config.fixedPos
}
getMS(){
return this.ms
}
getEndTime(){
return this.endTime
}
getType(){
return this.type
}
getLastFrame(){
return this.lastFrame
this.branch = config.branch
this.section = config.section
}
animate(ms){
this.animating = true
this.animT = ms
}
isAnimated(){
return this.animating
}
getAnimT(){
return this.animT
}
getPlayed(){
return this.isPlayed
}
isAnimationFinished(){
return this.animationEnded
}
endAnimation(){
this.animationEnded = true
}
played(score, big){
this.score = score
this.isPlayed = score <= 0 ? score - 1 : (big ? 2 : 1)
@@ -65,16 +39,4 @@ class Circle{
this.timesKa++
}
}
getScore(){
return this.score
}
getID(){
return this.id
}
getText(){
return this.text
}
getSpeed(){
return this.speed
}
}