From 884eafd81591b8ea7e6a62fd1d0435006773447a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Thu, 13 Dec 2018 22:17:26 +0900 Subject: [PATCH] Fix: loading frozen bug --- src/game/license_timer/loading.js | 24 ++----------------- src/game/license_timer/login.js | 18 ++++++-------- src/game/license_timer/main.js | 2 +- .../update_license_left_time.php | 2 +- 4 files changed, 11 insertions(+), 35 deletions(-) diff --git a/src/game/license_timer/loading.js b/src/game/license_timer/loading.js index a03d7cc..165eb76 100644 --- a/src/game/license_timer/loading.js +++ b/src/game/license_timer/loading.js @@ -28,28 +28,7 @@ var Loading = { startLoading: function() { game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png'); - - // game.load.image('a', '../../../resources/image/icon/fullscreen_white.png'); - // game.load.image('b', '../../../resources/image/icon/fullscreen_white.png'); - // game.load.image('c', '../../../resources/image/icon/fullscreen_white.png'); - // game.load.image('d', '../../../resources/image/icon/fullscreen_white.png'); - // game.load.image('a', './image/phaser.png'); - // game.load.image('b', './image/phaser.png'); - // game.load.image('c', './image/phaser.png'); - // game.load.image('d', './image/phaser.png'); - // game.load.image('e', './image/phaser.png'); - // game.load.image('g', './image/phaser.png'); - // game.load.image('e', './image/phaser.png'); - // game.load.image('f', './image/phaser.png'); - // game.load.image('g', './image/phaser.png'); - // game.load.image('h', './image/phaser.png'); - - // game.load.image('phaser', './image/phaser.png'); - // game.load.spritesheet('button', './image/button_basic.png', 200, 100); - // game.load.image('star', './image/star_particle.png'); - // game.load.image('medal_gold', './image/medal_gold.png'); - // game.load.image('medal_silver', './image/medal_silver.png'); - // game.load.image('medal_bronze', './image/medal_bronze.png'); + game.load.image('icon_home', '../../../resources/image/icon/home.png'); game.load.start(); }, @@ -81,5 +60,6 @@ var Loading = { // } this.state.start('Login'); + // this.state.start('LicenseTimer'); }, } diff --git a/src/game/license_timer/login.js b/src/game/license_timer/login.js index 8b354e2..f3e2255 100644 --- a/src/game/license_timer/login.js +++ b/src/game/license_timer/login.js @@ -1,10 +1,5 @@ var Login = { - preload: function() { - game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png'); - game.load.image('icon_home', '../../../resources/image/icon/home.png'); - }, - create: function() { // sessionStorageManager.resetPlayingAppData(); @@ -56,7 +51,7 @@ var Login = { this.makeInfoText(); - + /* if(isDebugMode()) { sessionStorageManager.setMaestroID(3); sessionStorageManager.setMaestroAccountType(4); @@ -66,6 +61,7 @@ var Login = { game.state.start('LicenseTimer'); } + */ }, back: function() { @@ -140,6 +136,9 @@ var Login = { sessionStorageManager.setPlayerName(this.inputTextName.canvasInput._value); var enterCode = this.inputTextEnterCode.canvasInput._value; + // console.log(maestroName); + // console.log(enterCode); + if(maestroName == "") { this.infoText.text = "마에스트로 계정 이름을 입력해주세요"; this.inputTextMaestroName.canvasInput.focus(); @@ -169,6 +168,7 @@ var Login = { }, loginSucceeded: function(jsonData) { + // console.log(jsonData); sessionStorageManager.setMaestroID(jsonData['MaestroID']); sessionStorageManager.setMaestroAccountType(jsonData['MaestroAccountType']); sessionStorageManager.setPlayerID(jsonData['PlayerID']); @@ -178,9 +178,6 @@ var Login = { sessionStorageManager.setPlayingAppName("menu"); // location.href = '../../web/client/menu_app.html'; - console.log("===== after login ====="); - console.log(sessionStorageManager.playerID); - game.state.start('LicenseTimer'); }, @@ -193,6 +190,5 @@ var Login = { if(jsonData["error"] !== null) { this.infoText.text = jsonData["error"]; } - } - + }, } \ No newline at end of file diff --git a/src/game/license_timer/main.js b/src/game/license_timer/main.js index 60b9861..f5eac87 100644 --- a/src/game/license_timer/main.js +++ b/src/game/license_timer/main.js @@ -13,4 +13,4 @@ game.state.add('Loading', Loading); game.state.add('Login', Login); game.state.add('LicenseTimer', LicenseTimer); -game.state.start('Loading'); +game.state.start('Loading'); \ No newline at end of file diff --git a/src/web/server/license_timer/update_license_left_time.php b/src/web/server/license_timer/update_license_left_time.php index acab580..1cdef79 100644 --- a/src/web/server/license_timer/update_license_left_time.php +++ b/src/web/server/license_timer/update_license_left_time.php @@ -26,7 +26,7 @@ function reset_left_time($maestro_id, $player_id, $subject_name) { $query = " UPDATE license_time - SET LeftTime = null, SavedDateTime = null, SubjectName = '' + SET LeftTime = null, SavedDateTime = null, SubjectName = ? WHERE MaestroID = ? AND PlayerID = ? "; $stmt = $db_conn->prepare($query);