Fix: remove useless self variable
This commit is contained in:
@@ -21,26 +21,8 @@ class DBConnectManager {
|
||||
requestPlayerHistory(listener) {
|
||||
let historyRecordManager = new HistoryRecordManager();
|
||||
|
||||
listener(historyRecordManager);
|
||||
}
|
||||
|
||||
requestRanking(type, listener) {
|
||||
let rankingRecordManager = new RankingRecordManager();
|
||||
|
||||
listener(rankingRecordManager);
|
||||
}
|
||||
|
||||
|
||||
requestTempPlayerHistory(listener) {
|
||||
let historyRecordManager = new HistoryRecordManager();
|
||||
|
||||
historyRecordManager.push(new HistoryRecord("05/14", "space_invaders", 14460));
|
||||
historyRecordManager.push(new HistoryRecord("05/13", "space_invaders", 12860));
|
||||
historyRecordManager.push(new HistoryRecord("05/12", "typing_english_basic", 15460));
|
||||
historyRecordManager.push(new HistoryRecord("05/11", "typing_korean_basic", 13040));
|
||||
historyRecordManager.push(new HistoryRecord("05/10", "space_invaders", 15460));
|
||||
historyRecordManager.push(new HistoryRecord("05/09", "typing_english_basic", 14607));
|
||||
historyRecordManager.push(new HistoryRecord("05/08", "typing_korean_basic", 13058));
|
||||
if(isDebugMode())
|
||||
this.loadTempPlayerHistory(historyRecordManager);
|
||||
|
||||
if(listener === null)
|
||||
return;
|
||||
@@ -48,9 +30,30 @@ class DBConnectManager {
|
||||
listener(historyRecordManager);
|
||||
}
|
||||
|
||||
requestTempRanking(type, listener) {
|
||||
requestRanking(type, listener) {
|
||||
let rankingRecordManager = new RankingRecordManager();
|
||||
|
||||
if(isDebugMode())
|
||||
this.loadTempRanking(rankingRecordManager);
|
||||
|
||||
if(listener === null)
|
||||
return;
|
||||
|
||||
listener(rankingRecordManager);
|
||||
}
|
||||
|
||||
|
||||
loadTempPlayerHistory(historyRecordManager) {
|
||||
historyRecordManager.push(new HistoryRecord("05/14", "space_invaders", 14460));
|
||||
historyRecordManager.push(new HistoryRecord("05/13", "space_invaders", 12860));
|
||||
historyRecordManager.push(new HistoryRecord("05/12", "typing_english_basic", 15460));
|
||||
historyRecordManager.push(new HistoryRecord("05/11", "typing_korean_basic", 13040));
|
||||
historyRecordManager.push(new HistoryRecord("05/10", "space_invaders", 15460));
|
||||
historyRecordManager.push(new HistoryRecord("05/09", "typing_english_basic", 14607));
|
||||
historyRecordManager.push(new HistoryRecord("05/08", "typing_korean_basic", 13058));
|
||||
}
|
||||
|
||||
loadTempRanking(rankingRecordManager) {
|
||||
rankingRecordManager.push(new RankingRecord(1, "강경모", 4400));
|
||||
rankingRecordManager.push(new RankingRecord(2, "강성태", 3400));
|
||||
rankingRecordManager.push(new RankingRecord(3, "김기덕", 2400));
|
||||
@@ -67,11 +70,6 @@ class DBConnectManager {
|
||||
rankingRecordManager.push(new RankingRecord(14, "합기도", 40));
|
||||
rankingRecordManager.push(new RankingRecord(15, "우습지", 10));
|
||||
rankingRecordManager.push(new RankingRecord(16, "하하하", 4));
|
||||
|
||||
if(listener === null)
|
||||
return;
|
||||
|
||||
listener(rankingRecordManager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,14 +13,13 @@ class HistoryBoard {
|
||||
this.textMyRanking = game.add.text(posX, posY + 100, '', arrayTabStyle)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
let self = this;
|
||||
this.dbConnectManager.requestTempPlayerHistory( historyRecordManager => {
|
||||
this.dbConnectManager.requestPlayerHistory( historyRecordManager => {
|
||||
for(let i = 0; i < historyRecordManager.count; i++) {
|
||||
if(i > 6)
|
||||
break;
|
||||
|
||||
let data = historyRecordManager.getAt(i);
|
||||
self.printRecord(i, data.date, data.score);
|
||||
this.printRecord(i, data.date, data.score);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,14 +13,13 @@ class RankingBoard {
|
||||
|
||||
|
||||
requestRanking(type, rankingRecordManager) {
|
||||
let self = this;
|
||||
this.dbConnectManager.requestTempRanking(type, rankingRecordManager => {
|
||||
this.dbConnectManager.requestRanking(type, rankingRecordManager => {
|
||||
for(let i = 0; i < rankingRecordManager.count; i++) {
|
||||
if(i > 6)
|
||||
break;
|
||||
|
||||
let data = rankingRecordManager.getAt(i);
|
||||
self.printRecord(type, i, data);
|
||||
this.printRecord(type, i, data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -25,11 +25,8 @@ class Start {
|
||||
// contents
|
||||
this.printHowToPlay(appInfoManager.getHowToPlayText(sessionStorageManager.playingAppName));
|
||||
this.makeStartButton();
|
||||
|
||||
this.printChartBaseLine();
|
||||
|
||||
let self = this;
|
||||
this.dbConnectManager.requestTempPlayerHistory( historyRecordManager => {
|
||||
this.dbConnectManager.requestPlayerHistory( historyRecordManager => {
|
||||
let underValue = historyRecordManager.underValueForGraph();
|
||||
let upperValue = historyRecordManager.upperValueForGraph();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user