Fix: ES6 -> ES5 (imcompleted)
This commit is contained in:
+21
-15
@@ -8,15 +8,13 @@ class Login {
|
||||
}
|
||||
|
||||
create() {
|
||||
self = this;
|
||||
|
||||
sessionStorageManager.clear();
|
||||
|
||||
this.game.stage.backgroundColor = '#4d4d4d';
|
||||
this.textStyle = { font: "bold 32px Arial", fill: "#fff", align: "right", boundsAlignH: "right", boundsAlignV: "middle" };
|
||||
|
||||
// top ui
|
||||
let screenTopUI = new ScreenTopUI();
|
||||
var screenTopUI = new ScreenTopUI();
|
||||
screenTopUI.makeBackButton( function() {
|
||||
sessionStorageManager.clear();
|
||||
location.href = '../../web/main/index.html';
|
||||
@@ -25,7 +23,7 @@ class Login {
|
||||
|
||||
|
||||
|
||||
let textX = this.game.world.centerX - 320;
|
||||
var textX = this.game.world.centerX - 320;
|
||||
if(sessionStorageManager.maestroID === null)
|
||||
this.makeMaestroNameText(textX, 200);
|
||||
this.makeNameText(textX, 300);
|
||||
@@ -64,7 +62,7 @@ class Login {
|
||||
}
|
||||
|
||||
makeInputTypeText(x, y, text) {
|
||||
let inputText = new InputTypeText(x + 420, y);
|
||||
var inputText = new InputTypeText(x + 420, y);
|
||||
inputText.anchor.set(0.5);
|
||||
inputText.canvasInput.value('');
|
||||
if(isDebugMode()) {
|
||||
@@ -72,7 +70,7 @@ class Login {
|
||||
}
|
||||
inputText.canvasInput._onkeyup = function() {
|
||||
if(event.keyCode == Phaser.Keyboard.ENTER) {
|
||||
self.startMenu();
|
||||
(function() { this.startMenu(); }).bind(this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,10 +78,14 @@ class Login {
|
||||
}
|
||||
|
||||
makeStartButton(x, y) {
|
||||
let setting = new RoundRectButtonSetting(x, y, 200, 100);
|
||||
var setting = new RoundRectButtonSetting(x, y, 200, 100);
|
||||
setting.fontStyle.fontWeight = "bold";
|
||||
|
||||
let startButton = new RoundRectButton(setting, RoundRectButton.NONE_ICON, "시작", this.startMenu);
|
||||
var startButton = new RoundRectButton(
|
||||
setting,
|
||||
RoundRectButton.NONE_ICON, "시작",
|
||||
(function() { this.startMenu(); }).bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
makeInfoText(x, y) {
|
||||
@@ -96,17 +98,21 @@ class Login {
|
||||
|
||||
|
||||
startMenu() {
|
||||
let maestroName = self.inputTextMaestroName.canvasInput._value;
|
||||
sessionStorageManager.playerName = self.inputTextName.canvasInput._value;
|
||||
let enterCode = self.inputTextEnterCode.canvasInput._value;
|
||||
var maestroName = this.inputTextMaestroName.canvasInput._value;
|
||||
sessionStorageManager.playerName = this.inputTextName.canvasInput._value;
|
||||
var enterCode = this.inputTextEnterCode.canvasInput._value;
|
||||
|
||||
let dbConnectManager = new DBConnectManager();
|
||||
var dbConnectManager = new DBConnectManager();
|
||||
dbConnectManager.requestCheckPlayerLogin(
|
||||
maestroName,
|
||||
sessionStorageManager.playerName,
|
||||
enterCode,
|
||||
self.loginSucceeded,
|
||||
self.loginFailed
|
||||
(function(jsonData) {
|
||||
this.loginSucceeded(jsonData);
|
||||
}).bind(this),
|
||||
(function(jsonData) {
|
||||
this.loginFailed(jsonData);
|
||||
}).bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -131,7 +137,7 @@ class Login {
|
||||
console.log('login failed, jsonData : ' + JSON.stringify(jsonData));
|
||||
|
||||
if(jsonData["error"] !== null) {
|
||||
self.infoText.text = jsonData["error"];
|
||||
this.infoText.text = jsonData["error"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user