const LANGUAGE_KOREAN = "korean"; const LANGUAGE_ENGLISH = "english"; const MODE_RELEASE = "release"; const MODE_DEBUG = "debug"; const runMode = MODE_RELEASE; function isDebugMode() { // console.log("debug mode ? " + runMode); return runMode == MODE_DEBUG ? true : false; } function isReleaseMode() { // console.log("release mode ? " + runMode); return runMode == MODE_RELEASE ? true : false; } const GAME_SCREEN_SIZE = { x: 1024, y: 768 } let sessionStorageManager = new SessionStorageManager(); { if(isDebugMode()) { console.log("maestroID : " + sessionStorageManager.getMaestroID()); console.log("maestroAccountType : " + sessionStorageManager.getMaestroAccountType()); console.log("playerName : " + sessionStorageManager.getPlayerName()); console.log("playerID : " + sessionStorageManager.getPlayerID()); console.log("playerAccountType : " + sessionStorageManager.getPlayerAccountType()); console.log("playingAppID : " + sessionStorageManager.getPlayingAppID()); console.log("playingAppName : " + sessionStorageManager.getPlayingAppName()); console.log("playingAppKoreanName : " + sessionStorageManager.getPlayingAppKoreanName()); console.log("record : " + sessionStorageManager.getRecord()); console.log("bestRecord : " + sessionStorageManager.getBestRecord()); } if(sessionStorageManager.getMaestroID() === null && !isLogin()) { goLogin(); } } function isLogin() { let filename = location.pathname.substring(location.pathname.lastIndexOf("/") + 1); // console.log(filename); return filename === "login.html" ? true : false; } function goLogin() { location.href = "login.html"; } function isTypingGame() { if(sessionStorageManager.getPlayingAppName() === null) return false; if(sessionStorageManager.getPlayingAppName().indexOf("typing") < 0) return false; return true; } function isTypingPracticeStage() { let appName = sessionStorageManager.getPlayingAppName(); if(appName.indexOf("practice_") > -1) return true; return false; } function isTypingTestStage() { let appName = sessionStorageManager.getPlayingAppName(); if(appName.indexOf("test_") > -1) return true; return false; } function isEnglishTypingStage() { if(sessionStorageManager.getPlayingAppName().indexOf("english") > -1) return true; return false; } function isKoreanTypingStage() { if(sessionStorageManager.getPlayingAppName().indexOf("korean") > -1) return true; return false; } function isTypingWordStage() { let appName = sessionStorageManager.getPlayingAppName(); if(appName.indexOf("_word") > -1) return true; // if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_word") > -1) // return true; return false; } function isTypingSentenceStage() { let appName = sessionStorageManager.getPlayingAppName(); if(appName.indexOf("_sentence") > -1) return true; // if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_sentence") > -1) // return true; return false; } let textStyleBasic = { font: "bold 32px Arial", fill: "#fff", align: "center", boundsAlignH: "center", boundsAlignV: "middle" };