Add: HistoryText
Fix: ranking.js, result.js
This commit is contained in:
@@ -4,17 +4,18 @@ function HistoryBoard(dataType) {
|
||||
return;
|
||||
}
|
||||
|
||||
var rankingTextOffsetY = game.world.height / 2 + 105;
|
||||
this.historyTexts = new Array();
|
||||
for(var i = 0; i < RankingBoard.RANK_COUNT; i++) {
|
||||
var posY = rankingTextOffsetY + (i % 10) * 30;
|
||||
this.historyTexts[i] = new HistoryText(80, posY);
|
||||
}
|
||||
|
||||
|
||||
this.todayBestRecord = 0;
|
||||
|
||||
this.dbConnectManager = new DBConnectManager();
|
||||
|
||||
var arrayTabStyle = { font: "20px Arial", fill: "#fff", align: "left", tabs: [ 40, 80, 120 ] };
|
||||
|
||||
var posX = 40;
|
||||
var posY = game.world.height / 2 - 10;
|
||||
this.textMyRanking = game.add.text(posX, posY + 100, '', arrayTabStyle)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
setTimeout(
|
||||
(function() {
|
||||
var today = new Date();
|
||||
@@ -51,22 +52,7 @@ HistoryBoard.prototype.calcDate = function(daysBefore) {
|
||||
|
||||
|
||||
HistoryBoard.prototype.printRecord = function(index, date, bestRecord) {
|
||||
var posX = 130;
|
||||
var posY = game.world.height / 2 + 90 + 30 * index;
|
||||
|
||||
var style = { font: "20px Arial", fill: "#ffc", align: "right", boundsAlignH: "right", boundsAlignV: "top" };
|
||||
|
||||
var dateText = game.add.text(posX, posY, StringUtil.printMonthDay(date), style);
|
||||
dateText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
dateText.anchor.set(1, 0);
|
||||
|
||||
var recordText = game.add.text(
|
||||
posX + 120, posY,
|
||||
RecordUtil.getRecordValueWithUnit(bestRecord, sessionStorageManager.getPlayingAppID()),
|
||||
style
|
||||
);
|
||||
recordText.anchor.set(1, 0);
|
||||
recordText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
this.historyTexts[index].setContents(date, bestRecord);
|
||||
}
|
||||
|
||||
HistoryBoard.prototype.printSample = function() {
|
||||
|
||||
Reference in New Issue
Block a user