mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
Fix tabbing out before drumrolls on auto play
This commit is contained in:
parent
7958afc0f0
commit
448927ad45
@ -18,7 +18,7 @@ class Game{
|
|||||||
}
|
}
|
||||||
this.HPGain = 100 / this.songData.circles.filter(circle => {
|
this.HPGain = 100 / this.songData.circles.filter(circle => {
|
||||||
var type = circle.getType()
|
var type = circle.getType()
|
||||||
return type == "don" || type == "ka" || type == "daiDon" || type == "daiKa"
|
return type === "don" || type === "ka" || type === "daiDon" || type === "daiKa"
|
||||||
}).length
|
}).length
|
||||||
this.paused = false
|
this.paused = false
|
||||||
this.started = false
|
this.started = false
|
||||||
@ -89,17 +89,17 @@ class Game{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if(currentTime > endTime){
|
}else if(currentTime > endTime){
|
||||||
if(drumrollNotes){
|
if(!this.controller.autoPlayEnabled){
|
||||||
circle.updateStatus(-1)
|
if(drumrollNotes){
|
||||||
circle.played(0, false)
|
circle.updateStatus(-1)
|
||||||
this.updateCurrentCircle()
|
circle.played(0, false)
|
||||||
if(this.controller.multiplayer == 1){
|
this.updateCurrentCircle()
|
||||||
p2.send("drumroll", {
|
if(this.controller.multiplayer === 1){
|
||||||
pace: (this.getElapsedTime().ms - circle.getMS()) / circle.timesHit
|
p2.send("drumroll", {
|
||||||
})
|
pace: (this.getElapsedTime().ms - circle.getMS()) / circle.timesHit
|
||||||
}
|
})
|
||||||
}else{
|
}
|
||||||
if(!this.controller.autoPlayEnabled){
|
}else{
|
||||||
circle.updateStatus(-1)
|
circle.updateStatus(-1)
|
||||||
var currentScore = 0
|
var currentScore = 0
|
||||||
circle.played(currentScore, type === "daiDon" || type === "daiKa")
|
circle.played(currentScore, type === "daiDon" || type === "daiKa")
|
||||||
@ -107,11 +107,11 @@ class Game{
|
|||||||
this.updateCurrentCircle()
|
this.updateCurrentCircle()
|
||||||
this.updateCombo(currentScore)
|
this.updateCombo(currentScore)
|
||||||
this.updateGlobalScore(currentScore, 1)
|
this.updateGlobalScore(currentScore, 1)
|
||||||
}
|
if(this.controller.multiplayer === 1){
|
||||||
if(this.controller.multiplayer === 1){
|
p2.send("note", {
|
||||||
p2.send("note", {
|
score: -1
|
||||||
score: -1
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,15 @@ class Mekadon{
|
|||||||
}
|
}
|
||||||
play(circle){
|
play(circle){
|
||||||
var type = circle.getType()
|
var type = circle.getType()
|
||||||
if(type == "balloon"){
|
if((type === "balloon" || type === "drumroll" || type === "daiDrumroll") && this.getMS() > circle.getEndTime()){
|
||||||
|
circle.updateStatus(-1)
|
||||||
|
circle.played(0, false)
|
||||||
|
this.game.updateCurrentCircle()
|
||||||
|
}
|
||||||
|
type = circle.getType()
|
||||||
|
if(type === "balloon"){
|
||||||
this.playDrumrollAt(circle, 0, 30)
|
this.playDrumrollAt(circle, 0, 30)
|
||||||
}else if(type == "drumroll" || type == "daiDrumroll"){
|
}else if(type === "drumroll" || type === "daiDrumroll"){
|
||||||
this.playDrumrollAt(circle, 0, 60)
|
this.playDrumrollAt(circle, 0, 60)
|
||||||
}else{
|
}else{
|
||||||
this.playAt(circle, 0, 450)
|
this.playAt(circle, 0, 450)
|
||||||
@ -59,12 +65,12 @@ class Mekadon{
|
|||||||
this.setKey(this.lr ? kbd["ka_l"] : kbd["ka_r"])
|
this.setKey(this.lr ? kbd["ka_l"] : kbd["ka_r"])
|
||||||
this.lr = !this.lr
|
this.lr = !this.lr
|
||||||
}
|
}
|
||||||
if(type == "balloon"){
|
if(type === "balloon"){
|
||||||
if(circle.requiredHits == 1){
|
if(circle.requiredHits == 1){
|
||||||
assets.sounds["balloon"].play()
|
assets.sounds["balloon"].play()
|
||||||
}
|
}
|
||||||
this.game.checkBalloon(circle)
|
this.game.checkBalloon(circle)
|
||||||
}else if(type == "drumroll" || type == "daiDrumroll"){
|
}else if(type === "drumroll" || type === "daiDrumroll"){
|
||||||
this.game.checkDrumroll(circle)
|
this.game.checkDrumroll(circle)
|
||||||
}else{
|
}else{
|
||||||
if(typeof score == "undefined"){
|
if(typeof score == "undefined"){
|
||||||
|
Loading…
Reference in New Issue
Block a user