Fix: change score -> record, bestRecord
This commit is contained in:
@@ -32,7 +32,7 @@ class HistoryBoard {
|
||||
break;
|
||||
|
||||
let data = historyRecordManager.getAt(maxIndex);
|
||||
this.printRecord(i, data.date, data.score);
|
||||
this.printRecord(i, data.date, data.bestRecord);
|
||||
maxIndex--;
|
||||
}
|
||||
}
|
||||
@@ -40,14 +40,14 @@ class HistoryBoard {
|
||||
}
|
||||
|
||||
|
||||
printRecord(index, date, score) {
|
||||
printRecord(index, date, bestRecord) {
|
||||
if(sessionStorageManager.playingAppName.indexOf("typing") < 0)
|
||||
this.printMouseAppHistory(index, date, score);
|
||||
this.printMouseAppHistory(index, date, bestRecord);
|
||||
else
|
||||
this.printTypingAppHistory(index, date, appName, score);
|
||||
this.printTypingAppHistory(index, date, appName, bestRecord);
|
||||
}
|
||||
|
||||
printMouseAppHistory(index, date, score) {
|
||||
printMouseAppHistory(index, date, bestRecord) {
|
||||
let posX = 60;
|
||||
let posY = game.world.height / 2 + 90 + 30 * index;
|
||||
|
||||
@@ -59,12 +59,12 @@ class HistoryBoard {
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
style.boundsAlignH = "right";
|
||||
game.add.text(posX + 80, posY, StringUtil.getScoreTextWithoutUnit(score), style)
|
||||
game.add.text(posX + 80, posY, StringUtil.getRecordTextWithoutUnit(bestRecord), style)
|
||||
.setTextBounds(0, 0, 100, 60)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
}
|
||||
|
||||
printTypingAppHistory(index, date, appName, score) {
|
||||
printTypingAppHistory(index, date, appName, bestRecord) {
|
||||
let posX = 60;
|
||||
let posY = game.world.height / 2 + 90 + 30 * index;
|
||||
|
||||
@@ -80,7 +80,7 @@ class HistoryBoard {
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
style.boundsAlignH = "right";
|
||||
game.add.text(posX + 120, posY, StringUtil.getScoreTextWithoutUnit(score), style)
|
||||
game.add.text(posX + 120, posY, StringUtil.getRecordTextWithoutUnit(bestRecord), style)
|
||||
.setTextBounds(0, 0, 80, 60)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user