Fix: change score -> record, bestRecord
This commit is contained in:
@@ -47,7 +47,7 @@ class Start {
|
||||
break;
|
||||
|
||||
let data = historyRecordManager.getAt(i);
|
||||
this.drawRecordGraph(i, data.date, data.score, minValue, maxValue);
|
||||
this.drawRecordGraph(i, data.date, data.bestRecord, minValue, maxValue);
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -84,7 +84,7 @@ class Start {
|
||||
this.chartGraphics.lineTo(game.world.width - 200, 0);
|
||||
}
|
||||
|
||||
drawRecordGraph(index, date, score, min, max) {
|
||||
drawRecordGraph(index, date, bestRecord, min, max) {
|
||||
const CHART_GAP_PX = 120;
|
||||
const CHART_HEIGHT = 120;
|
||||
const style = { font: "24px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||
@@ -97,17 +97,17 @@ class Start {
|
||||
dateText.stroke = "#333";
|
||||
dateText.strokeThickness = 1;
|
||||
|
||||
let scoreText = game.add.text(
|
||||
let bestRecordText = game.add.text(
|
||||
100 + index * CHART_GAP_PX, game.world.height - 300,
|
||||
StringUtil.getScoreTextWithUnit(score), style
|
||||
StringUtil.getRecordTextWithUnit(bestRecord), style
|
||||
);
|
||||
scoreText.setTextBounds(0, 0, 100, 100);
|
||||
scoreText.stroke = "#333";
|
||||
scoreText.strokeThickness = 1;
|
||||
bestRecordText.setTextBounds(0, 0, 100, 100);
|
||||
bestRecordText.stroke = "#333";
|
||||
bestRecordText.strokeThickness = 1;
|
||||
|
||||
this.chartGraphics.lineStyle(50, 0xdddddd, 1);
|
||||
this.chartGraphics.moveTo(50 + index * CHART_GAP_PX, 0);
|
||||
this.chartGraphics.lineTo(50 + index * CHART_GAP_PX, -1 * CHART_HEIGHT * ( (score - min) / (max - min) ));
|
||||
this.chartGraphics.lineTo(50 + index * CHART_GAP_PX, -1 * CHART_HEIGHT * ( (bestRecord - min) / (max - min) ));
|
||||
}
|
||||
|
||||
startStage() {
|
||||
|
||||
Reference in New Issue
Block a user