Add: player login with maestro

This commit is contained in:
2018-10-28 14:21:03 +09:00
parent 5cb864058f
commit 0dc052dd79
4 changed files with 55 additions and 6 deletions
+14 -6
View File
@@ -6,7 +6,7 @@ var Login = {
},
create: function() {
sessionStorageManager.clear();
// sessionStorageManager.clear(); // receive maestro_name from player_login_with_maestro.php
this.game.stage.backgroundColor = '#4d4d4d';
this.textStyle = { font: "bold 32px Arial", fill: "#fff", align: "right", boundsAlignH: "right", boundsAlignV: "middle" };
@@ -28,10 +28,18 @@ var Login = {
var textX = this.game.world.centerX - 320;
if(sessionStorageManager.getMaestroID() === null)
this.makeMaestroNameText(textX, 200);
this.makeMaestroNameText(textX, 200);
this.makeNameText(textX, 300);
this.makeEnterCodeText(textX, 360);
if(sessionStorageManager.getMaestroName() != null) {
this.inputTextMaestroName.canvasInput.value(sessionStorageManager.getMaestroName());
} else {
if(isDebugMode()) {
this.inputTextMaestroName.canvasInput.value("삼화초");
this.inputTextName.canvasInput.value("박지상");
this.inputTextEnterCode.canvasInput.value("760621");
}
}
if(sessionStorageManager.getMaestroID() === null)
this.inputTextMaestroName.canvasInput.focus();
@@ -50,17 +58,17 @@ var Login = {
makeMaestroNameText: function(x, y) {
this.makeTextField(x, y, "마에스트로 계정 :");
this.inputTextMaestroName = this.makeInputTypeText(x, y, "삼화초");
this.inputTextMaestroName = this.makeInputTypeText(x, y, "");
},
makeNameText: function(x, y) {
this.makeTextField(x, y, "이름 :");
this.inputTextName = this.makeInputTypeText(x, y, "박지상");
this.inputTextName = this.makeInputTypeText(x, y, "");
},
makeEnterCodeText: function(x, y) {
this.makeTextField(x, y, "입장번호 :");
this.inputTextEnterCode = this.makeInputTypeText(x, y, "760621");
this.inputTextEnterCode = this.makeInputTypeText(x, y, "");
},
makeTextField: function(x, y, text) {