Fix: result record, ranking board bug
This commit is contained in:
@@ -15,25 +15,31 @@ function HistoryBoard(type) {
|
||||
this.textMyRanking = game.add.text(posX, posY + 100, '', arrayTabStyle)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
var today = new Date();
|
||||
var date = DateUtil.getYYYYMMDD(today);
|
||||
this.dbConnectManager.requestPlayerHistory(
|
||||
sessionStorageManager.getMaestroID(),
|
||||
date,
|
||||
(function(historyRecordManager) {
|
||||
if(historyRecordManager.getCount() == 0) {
|
||||
console.log("history board - no data");
|
||||
return;
|
||||
}
|
||||
setTimeout(
|
||||
(function() {
|
||||
var today = new Date();
|
||||
var date = DateUtil.getYYYYMMDD(today);
|
||||
this.dbConnectManager.requestPlayerHistory(
|
||||
sessionStorageManager.getMaestroID(),
|
||||
date,
|
||||
(function(historyRecordManager) {
|
||||
if(historyRecordManager.getCount() == 0) {
|
||||
console.log("history board - no data");
|
||||
return;
|
||||
}
|
||||
|
||||
for(var i = 0; i < historyRecordManager.getCount(); i++) {
|
||||
var data = historyRecordManager.getAt(i);
|
||||
this.printRecord(i, data.date, data.bestRecord);
|
||||
for(var i = 0; i < historyRecordManager.getCount(); i++) {
|
||||
var data = historyRecordManager.getAt(i);
|
||||
this.printRecord(i, data.date, data.bestRecord);
|
||||
|
||||
if(date == data.date)
|
||||
this.todayBestRecord = data.bestRecord;
|
||||
}
|
||||
}).bind(this)
|
||||
if(date == data.date)
|
||||
this.todayBestRecord = data.bestRecord;
|
||||
}
|
||||
}).bind(this)
|
||||
);
|
||||
}).bind(this),
|
||||
|
||||
RecordBoard.DELAY_UPDATING_RESULT_RECORD_MS
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user