temp text fix
This commit is contained in:
parent
ea5da16dac
commit
d2dbdf10bb
@ -320,7 +320,7 @@ class Stats {
|
|||||||
if (pattern_score)
|
if (pattern_score)
|
||||||
printTempTexts([pattern_name, pattern_score])
|
printTempTexts([pattern_name, pattern_score])
|
||||||
if (combo_score)
|
if (combo_score)
|
||||||
printTempTexts([this.combo, combo_score])
|
printTempTexts(["COMBO x" + this.combo, combo_score])
|
||||||
}
|
}
|
||||||
|
|
||||||
print() {
|
print() {
|
||||||
@ -661,13 +661,15 @@ function pause() {
|
|||||||
|
|
||||||
function printTempTexts(texts) {
|
function printTempTexts(texts) {
|
||||||
tempTexts.push(texts)
|
tempTexts.push(texts)
|
||||||
console.log(tempTexts)
|
if (!scheduler.intervalTasks.has(delTempTexts))
|
||||||
scheduler.setTimeout(delTempTexts, TEMP_TEXTS_DELAY)
|
scheduler.setInterval(delTempTexts, TEMP_TEXTS_DELAY)
|
||||||
}
|
}
|
||||||
|
|
||||||
function delTempTexts(self) {
|
function delTempTexts(self) {
|
||||||
if (tempTexts.length)
|
if (tempTexts.length)
|
||||||
tempTexts.shift()
|
tempTexts.shift()
|
||||||
|
else
|
||||||
|
scheduler.clearInterval(delTempTexts)
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
|
Reference in New Issue
Block a user