Fix: start.js ES6 -> ES5
This commit is contained in:
+18
-21
@@ -1,13 +1,10 @@
|
||||
/////////////////////////////
|
||||
// Start
|
||||
var Start = {
|
||||
|
||||
class Start {
|
||||
|
||||
preload() {
|
||||
preload: function() {
|
||||
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||
}
|
||||
},
|
||||
|
||||
create() {
|
||||
create: function() {
|
||||
this.dbConnectManager = new DBConnectManager();
|
||||
|
||||
this.game.stage.backgroundColor = '#4d4d4d';
|
||||
@@ -64,9 +61,9 @@ class Start {
|
||||
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.getBestRecord());
|
||||
}).bind(this)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
loadHowToPlay(appID) {
|
||||
loadHowToPlay: function(appID) {
|
||||
this.dbConnectManager.requestHowToPlay(
|
||||
sessionStorageManager.getPlayingAppID(), // space_invaders app ID
|
||||
(function(jsonData) {
|
||||
@@ -78,9 +75,9 @@ class Start {
|
||||
}).bind(this)
|
||||
);
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
loadChart() {
|
||||
loadChart: function() {
|
||||
var today = new Date();
|
||||
var date = DateUtil.getYYYYMMDD(today);
|
||||
this.dbConnectManager.requestPlayerHistory(
|
||||
@@ -115,15 +112,15 @@ class Start {
|
||||
this.chart.printChartBaseLine();
|
||||
}).bind(this)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
calcDate(daysBefore) {
|
||||
calcDate: function(daysBefore) {
|
||||
var date = new Date();
|
||||
date.setDate(date.getDate() - daysBefore);
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
printSampleChart() {
|
||||
printSampleChart: function() {
|
||||
var minValue = 0;
|
||||
var maxValue = 1000;
|
||||
this.chart.drawRecordGraph(0, this.calcDate(1), 980, minValue, maxValue);
|
||||
@@ -135,16 +132,16 @@ class Start {
|
||||
this.chart.drawRecordGraph(6, this.calcDate(20), 480, minValue, maxValue);
|
||||
|
||||
this.chart.printChartBaseLine();
|
||||
}
|
||||
},
|
||||
|
||||
makeStartButton() {
|
||||
makeStartButton: function() {
|
||||
var setting = new RoundRectButtonSetting(game.world.centerX, game.world.centerY, 200, 100);
|
||||
setting.fontStyle.fontWeight = "bold";
|
||||
|
||||
var startButton = new RoundRectButton(setting, RoundRectButton.NONE_ICON, "시작", this.startStage);
|
||||
}
|
||||
},
|
||||
|
||||
makeRankingButton() {
|
||||
makeRankingButton: function() {
|
||||
var setting = new RoundRectButtonSetting(game.world.centerX + 160, game.world.centerY, 60, 60);
|
||||
setting.fontStyle = {
|
||||
font: "18px Arial",
|
||||
@@ -161,10 +158,10 @@ class Start {
|
||||
);
|
||||
if(sessionStorageManager.getMaestroAccountType() == 100)
|
||||
rankingButton.inputEnabled = false;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
startStage() {
|
||||
startStage: function() {
|
||||
if(isTypingPracticeStage())
|
||||
location.href = "../../web/client/typing_practice.html";
|
||||
else if(isTypingTestStage())
|
||||
|
||||
Reference in New Issue
Block a user