Fix: IE10 bug - let, const -> var
This commit is contained in:
@@ -20,7 +20,7 @@ var GAME_SCREEN_SIZE = { x: 1024, y: 768 }
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
let sessionStorageManager = new SessionStorageManager();
|
var sessionStorageManager = new SessionStorageManager();
|
||||||
{
|
{
|
||||||
if(isDebugMode()) {
|
if(isDebugMode()) {
|
||||||
console.log("maestroName : " + sessionStorageManager.getMaestroName());
|
console.log("maestroName : " + sessionStorageManager.getMaestroName());
|
||||||
@@ -42,7 +42,7 @@ let sessionStorageManager = new SessionStorageManager();
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isLogin() {
|
function isLogin() {
|
||||||
let filename = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
var filename = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
||||||
// console.log(filename);
|
// console.log(filename);
|
||||||
|
|
||||||
return filename === "login.html" ? true : false;
|
return filename === "login.html" ? true : false;
|
||||||
@@ -75,7 +75,7 @@ function isMouseGameApp() {
|
|||||||
|
|
||||||
|
|
||||||
function isTypingPracticeApp() {
|
function isTypingPracticeApp() {
|
||||||
let appName = sessionStorageManager.getPlayingAppName();
|
var appName = sessionStorageManager.getPlayingAppName();
|
||||||
|
|
||||||
if(appName.indexOf("practice_") > -1)
|
if(appName.indexOf("practice_") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -84,7 +84,7 @@ function isTypingPracticeApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingTestApp() {
|
function isTypingTestApp() {
|
||||||
let appName = sessionStorageManager.getPlayingAppName();
|
var appName = sessionStorageManager.getPlayingAppName();
|
||||||
|
|
||||||
if(appName.indexOf("test_") > -1)
|
if(appName.indexOf("test_") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -107,7 +107,7 @@ function isKoreanTypingApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingWordApp() {
|
function isTypingWordApp() {
|
||||||
let appName = sessionStorageManager.getPlayingAppName();
|
var appName = sessionStorageManager.getPlayingAppName();
|
||||||
|
|
||||||
if(appName.indexOf("_word") > -1)
|
if(appName.indexOf("_word") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -119,7 +119,7 @@ function isTypingWordApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingSentenceApp() {
|
function isTypingSentenceApp() {
|
||||||
let appName = sessionStorageManager.getPlayingAppName();
|
var appName = sessionStorageManager.getPlayingAppName();
|
||||||
|
|
||||||
if(appName.indexOf("_sentence") > -1)
|
if(appName.indexOf("_sentence") > -1)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
const LANGUAGE_KOREAN = "korean";
|
var LANGUAGE_KOREAN = "korean";
|
||||||
const LANGUAGE_ENGLISH = "english";
|
var LANGUAGE_ENGLISH = "english";
|
||||||
|
|
||||||
const MODE_RELEASE = "release";
|
var MODE_RELEASE = "release";
|
||||||
const MODE_DEBUG = "debug";
|
var MODE_DEBUG = "debug";
|
||||||
const runMode = MODE_DEBUG;
|
var runMode = MODE_DEBUG;
|
||||||
|
|
||||||
function isDebugMode() {
|
function isDebugMode() {
|
||||||
// console.log("debug mode ? " + runMode);
|
// console.log("debug mode ? " + runMode);
|
||||||
@@ -16,11 +16,11 @@ function isReleaseMode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const GAME_SCREEN_SIZE = { x: 1024, y: 768 }
|
var GAME_SCREEN_SIZE = { x: 1024, y: 768 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let sessionStorageManager = new SessionStorageManager();
|
var sessionStorageManager = new SessionStorageManager();
|
||||||
{
|
{
|
||||||
// if(isDebugMode()) {
|
// if(isDebugMode()) {
|
||||||
// sessionStorageManager.playerName = "부현율";
|
// sessionStorageManager.playerName = "부현율";
|
||||||
@@ -48,7 +48,7 @@ let sessionStorageManager = new SessionStorageManager();
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isLogin() {
|
function isLogin() {
|
||||||
let filename = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
var filename = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
||||||
// console.log(filename);
|
// console.log(filename);
|
||||||
|
|
||||||
return filename === "login.html" ? true : false;
|
return filename === "login.html" ? true : false;
|
||||||
@@ -69,7 +69,7 @@ function isTypingGame() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingPracticeStage() {
|
function isTypingPracticeStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if(appName.indexOf("practice_") > -1)
|
if(appName.indexOf("practice_") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -78,7 +78,7 @@ function isTypingPracticeStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingTestStage() {
|
function isTypingTestStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if(appName.indexOf("test_") > -1)
|
if(appName.indexOf("test_") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -87,7 +87,7 @@ function isTypingTestStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingWordStage() {
|
function isTypingWordStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_word") > -1)
|
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_word") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -96,7 +96,7 @@ function isTypingWordStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingSentenceStage() {
|
function isTypingSentenceStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_sentence") > -1)
|
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_sentence") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -105,4 +105,4 @@ function isTypingSentenceStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let textStyleBasic = { font: "bold 32px Arial", fill: "#fff", align: "center", boundsAlignH: "center", boundsAlignV: "middle" };
|
var textStyleBasic = { font: "bold 32px Arial", fill: "#fff", align: "center", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
const LANGUAGE_KOREAN = "korean";
|
var LANGUAGE_KOREAN = "korean";
|
||||||
const LANGUAGE_ENGLISH = "english";
|
var LANGUAGE_ENGLISH = "english";
|
||||||
|
|
||||||
const MODE_RELEASE = "release";
|
var MODE_RELEASE = "release";
|
||||||
const MODE_DEBUG = "debug";
|
var MODE_DEBUG = "debug";
|
||||||
const runMode = MODE_RELEASE;
|
var runMode = MODE_RELEASE;
|
||||||
|
|
||||||
function isDebugMode() {
|
function isDebugMode() {
|
||||||
// console.log("debug mode ? " + runMode);
|
// console.log("debug mode ? " + runMode);
|
||||||
@@ -16,11 +16,11 @@ function isReleaseMode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const GAME_SCREEN_SIZE = { x: 1024, y: 768 }
|
var GAME_SCREEN_SIZE = { x: 1024, y: 768 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let sessionStorageManager = new SessionStorageManager();
|
var sessionStorageManager = new SessionStorageManager();
|
||||||
{
|
{
|
||||||
// if(isDebugMode()) {
|
// if(isDebugMode()) {
|
||||||
// sessionStorageManager.playerName = "부현율";
|
// sessionStorageManager.playerName = "부현율";
|
||||||
@@ -48,7 +48,7 @@ let sessionStorageManager = new SessionStorageManager();
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isLogin() {
|
function isLogin() {
|
||||||
let filename = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
var filename = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
|
||||||
// console.log(filename);
|
// console.log(filename);
|
||||||
|
|
||||||
return filename === "login.html" ? true : false;
|
return filename === "login.html" ? true : false;
|
||||||
@@ -69,7 +69,7 @@ function isTypingGame() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingPracticeStage() {
|
function isTypingPracticeStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if(appName.indexOf("practice_") > -1)
|
if(appName.indexOf("practice_") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -78,7 +78,7 @@ function isTypingPracticeStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingTestStage() {
|
function isTypingTestStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if(appName.indexOf("test_") > -1)
|
if(appName.indexOf("test_") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -87,7 +87,7 @@ function isTypingTestStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingWordStage() {
|
function isTypingWordStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_word") > -1)
|
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_word") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -96,7 +96,7 @@ function isTypingWordStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isTypingSentenceStage() {
|
function isTypingSentenceStage() {
|
||||||
let appName = sessionStorageManager.playingAppName;
|
var appName = sessionStorageManager.playingAppName;
|
||||||
|
|
||||||
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_sentence") > -1)
|
if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_sentence") > -1)
|
||||||
return true;
|
return true;
|
||||||
@@ -105,4 +105,4 @@ function isTypingSentenceStage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let textStyleBasic = { font: "bold 32px Arial", fill: "#fff", align: "center", boundsAlignH: "center", boundsAlignV: "middle" };
|
var textStyleBasic = { font: "bold 32px Arial", fill: "#fff", align: "center", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Animal.prototype.stopAnimation = function() {
|
|||||||
|
|
||||||
|
|
||||||
Animal.animalLevelIDByRecord = function(record, gameType) {
|
Animal.animalLevelIDByRecord = function(record, gameType) {
|
||||||
for(let i = Animal.SPECIES_DATA.length - 1; i > 0; i--) {
|
for(var i = Animal.SPECIES_DATA.length - 1; i > 0; i--) {
|
||||||
if(record >= this.typingCount(Animal.SPECIES_DATA[i], gameType))
|
if(record >= this.typingCount(Animal.SPECIES_DATA[i], gameType))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ function AnnounceBox(x, y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AnnounceBox.prototype.drawText = function(posX, posY, text) {
|
AnnounceBox.prototype.drawText = function(posX, posY, text) {
|
||||||
const style = { font: "24px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "24px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
|
|
||||||
let textObject = game.add.text(
|
var textObject = game.add.text(
|
||||||
posX, posY,
|
posX, posY,
|
||||||
text, style
|
text, style
|
||||||
);
|
);
|
||||||
@@ -35,7 +35,7 @@ AnnounceBox.prototype.drawBox = function(text) {
|
|||||||
this.graphics.lineTo(0, 50);
|
this.graphics.lineTo(0, 50);
|
||||||
this.graphics.endFill();
|
this.graphics.endFill();
|
||||||
|
|
||||||
let announceText = this.drawText(
|
var announceText = this.drawText(
|
||||||
game.world.width / 2, this.posY - 75,
|
game.world.width / 2, this.posY - 75,
|
||||||
text
|
text
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ BackButton.prototype = Object.create(RoundRectButton);
|
|||||||
BackButton.constructor = BackButton;
|
BackButton.constructor = BackButton;
|
||||||
|
|
||||||
function BackButton(clickEvent) {
|
function BackButton(clickEvent) {
|
||||||
let setting = new RoundRectButtonSetting(30, 30, 50, 50);
|
var setting = new RoundRectButtonSetting(30, 30, 50, 50);
|
||||||
setting.fontStyle.boundsAlignH = "center"; // left, center. right
|
setting.fontStyle.boundsAlignH = "center"; // left, center. right
|
||||||
setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom
|
setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom
|
||||||
setting.strokeWidthPx = 3;
|
setting.strokeWidthPx = 3;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ HomeButton.prototype = Object.create(RoundRectButton);
|
|||||||
HomeButton.constructor = HomeButton;
|
HomeButton.constructor = HomeButton;
|
||||||
|
|
||||||
function HomeButton(clickEvent) {
|
function HomeButton(clickEvent) {
|
||||||
let setting = new RoundRectButtonSetting(30, 30, 50, 50);
|
var setting = new RoundRectButtonSetting(30, 30, 50, 50);
|
||||||
setting.fontStyle.boundsAlignH = "center"; // left, center. right
|
setting.fontStyle.boundsAlignH = "center"; // left, center. right
|
||||||
setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom
|
setting.fontStyle.boundsAlignV = "middle"; // top, middle, bottom
|
||||||
setting.strokeWidthPx = 3;
|
setting.strokeWidthPx = 3;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Chart.prototype.drawRecordGraph = function(index, date, bestRecord, min, max) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Chart.prototype.drawText = function(posX, posY, text) {
|
Chart.prototype.drawText = function(posX, posY, text) {
|
||||||
const style = { font: "24px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "24px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
|
|
||||||
var textObject = game.add.text(
|
var textObject = game.add.text(
|
||||||
posX, posY,
|
posX, posY,
|
||||||
|
|||||||
+19
-19
@@ -2,7 +2,7 @@ function StringUtil() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StringUtil.printMonthDay = function(date) {
|
StringUtil.printMonthDay = function(date) {
|
||||||
// let dateTime = new Date(date);
|
// var dateTime = new Date(date);
|
||||||
var a = date.split(" ");
|
var a = date.split(" ");
|
||||||
var d = a[0].split("-");
|
var d = a[0].split("-");
|
||||||
var t = "0:0:0".split(":");
|
var t = "0:0:0".split(":");
|
||||||
@@ -13,13 +13,13 @@ StringUtil.printMonthDay = function(date) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StringUtil.getRecordTextWithoutUnit = function(value) {
|
StringUtil.getRecordTextWithoutUnit = function(value) {
|
||||||
let number = Math.floor(value);
|
var number = Math.floor(value);
|
||||||
return NumberUtil.numberWithCommas(number);
|
return NumberUtil.numberWithCommas(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringUtil.getRecordTextWithUnit = function(value) {
|
StringUtil.getRecordTextWithUnit = function(value) {
|
||||||
let number = Math.floor(value);
|
var number = Math.floor(value);
|
||||||
let numberWithCommas = NumberUtil.numberWithCommas(number);
|
var numberWithCommas = NumberUtil.numberWithCommas(number);
|
||||||
|
|
||||||
if(isTypingGame())
|
if(isTypingGame())
|
||||||
return numberWithCommas + " 타";
|
return numberWithCommas + " 타";
|
||||||
@@ -28,21 +28,21 @@ StringUtil.getRecordTextWithUnit = function(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StringUtil.getNumberStartWithZero = function(number, digitCount) {
|
StringUtil.getNumberStartWithZero = function(number, digitCount) {
|
||||||
let n = number + '';
|
var n = number + '';
|
||||||
return n.length >= digitCount ? n : new Array(digitCount - n.length + 1).join('0') + n;
|
return n.length >= digitCount ? n : new Array(digitCount - n.length + 1).join('0') + n;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringUtil.toKoreanAlphabets = function(text) {
|
StringUtil.toKoreanAlphabets = function(text) {
|
||||||
const cCho = [ 'ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
var cCho = [ 'ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
||||||
const cJung = [ 'ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅠ', 'ㅡ', 'ㅢ', 'ㅣ' ];
|
var cJung = [ 'ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅠ', 'ㅡ', 'ㅢ', 'ㅣ' ];
|
||||||
const cJong = [ '', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ', 'ㅂ', 'ㅄ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
var cJong = [ '', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ', 'ㅂ', 'ㅄ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
||||||
|
|
||||||
let cho, jung, jong;
|
var cho, jung, jong;
|
||||||
let str = text;
|
var str = text;
|
||||||
let cnt = str.length;
|
var cnt = str.length;
|
||||||
let chars = [], cCode;
|
var chars = [], cCode;
|
||||||
|
|
||||||
for (let i = 0; i < cnt; i++) {
|
for (var i = 0; i < cnt; i++) {
|
||||||
cCode = str.charCodeAt(i);
|
cCode = str.charCodeAt(i);
|
||||||
// if (cCode == 32) { continue; } // 한글이 아닌 경우
|
// if (cCode == 32) { continue; } // 한글이 아닌 경우
|
||||||
if (cCode < 0xAC00 || cCode > 0xD7A3) {
|
if (cCode < 0xAC00 || cCode > 0xD7A3) {
|
||||||
@@ -63,21 +63,21 @@ StringUtil.toKoreanAlphabets = function(text) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
StringUtil.getUnicodeAlphabetCount = function(text) {
|
StringUtil.getUnicodeAlphabetCount = function(text) {
|
||||||
let chars = StringUtil.toKoreanAlphabets(text);
|
var chars = StringUtil.toKoreanAlphabets(text);
|
||||||
// console.log('char : ' + chars);
|
// console.log('char : ' + chars);
|
||||||
|
|
||||||
let doubleJaum = [
|
var doubleJaum = [
|
||||||
'ㄲ', 'ㅉ', 'ㄸ', 'ㄲ', 'ㅆ',
|
'ㄲ', 'ㅉ', 'ㄸ', 'ㄲ', 'ㅆ',
|
||||||
'ㄳ', 'ㄵ', 'ㄶ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅄ'
|
'ㄳ', 'ㄵ', 'ㄶ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅄ'
|
||||||
];
|
];
|
||||||
let doubleMoum = [
|
var doubleMoum = [
|
||||||
'ㅒ', 'ㅖ',
|
'ㅒ', 'ㅖ',
|
||||||
'ㅘ', 'ㅙ', 'ㅚ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅢ'
|
'ㅘ', 'ㅙ', 'ㅚ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅢ'
|
||||||
];
|
];
|
||||||
|
|
||||||
let alphabetCount = 0;
|
var alphabetCount = 0;
|
||||||
let alphabet;
|
var alphabet;
|
||||||
for(let i = 0; i < chars.length; i++) {
|
for(var i = 0; i < chars.length; i++) {
|
||||||
alphabet = chars[i];
|
alphabet = chars[i];
|
||||||
if(doubleJaum.indexOf(alphabet) > -1 || doubleMoum.indexOf(alphabet) > -1) {
|
if(doubleJaum.indexOf(alphabet) > -1 || doubleMoum.indexOf(alphabet) > -1) {
|
||||||
// console.log('double alphabet : ' + alphabet);
|
// console.log('double alphabet : ' + alphabet);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ var Loading = {
|
|||||||
create: function() {
|
create: function() {
|
||||||
// console.log('Loading');
|
// console.log('Loading');
|
||||||
|
|
||||||
let userID = sessionStorage.getItem("UserID");
|
var userID = sessionStorage.getItem("UserID");
|
||||||
console.log("userID : " + userID);
|
console.log("userID : " + userID);
|
||||||
|
|
||||||
this.game.stage.backgroundColor = '#4d4d4d';
|
this.game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Login";
|
var CONTENT_ID = "Login";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID
|
Phaser.CANVAS, CONTENT_ID
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ function AppAreaBG(color, alpha, x, y, width, height) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AppAreaBG.prototype.printText = function(text, x, y, size, color, alpha) {
|
AppAreaBG.prototype.printText = function(text, x, y, size, color, alpha) {
|
||||||
let fontStyle = { font: "36px Arial", fill: "#fff", align: "left", boundsAlignH: "left", boundsAlignV: "bottom" };
|
var fontStyle = { font: "36px Arial", fill: "#fff", align: "left", boundsAlignH: "left", boundsAlignV: "bottom" };
|
||||||
let titleText = game.add.text(x, y, text, fontStyle);
|
var titleText = game.add.text(x, y, text, fontStyle);
|
||||||
titleText.anchor.set(0.5);
|
titleText.anchor.set(0.5);
|
||||||
titleText.fontSize = size;
|
titleText.fontSize = size;
|
||||||
titleText.addColor(color, 0);
|
titleText.addColor(color, 0);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Menu";
|
var CONTENT_ID = "Menu";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID
|
Phaser.CANVAS, CONTENT_ID
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Menu";
|
var CONTENT_ID = "Menu";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID
|
Phaser.CANVAS, CONTENT_ID
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Menu";
|
var CONTENT_ID = "Menu";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID
|
Phaser.CANVAS, CONTENT_ID
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ NoticeExperiencePlayerText.prototype.makeText = function(x, y, text, fontSize, f
|
|||||||
newText.strokeThickness = 5;
|
newText.strokeThickness = 5;
|
||||||
|
|
||||||
newText.alpha = 1;
|
newText.alpha = 1;
|
||||||
let tweenAlpha = game.add.tween(newText);
|
var tweenAlpha = game.add.tween(newText);
|
||||||
tweenAlpha.to( { alpha: 0 }, Phaser.Timer.SECOND * 5, Phaser.Easing.Back.In, true);
|
tweenAlpha.to( { alpha: 0 }, Phaser.Timer.SECOND * 5, Phaser.Easing.Back.In, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function WelcomePlayerText(playerName) {
|
|||||||
this.strokeThickness = 5;
|
this.strokeThickness = 5;
|
||||||
|
|
||||||
this.alpha = 1;
|
this.alpha = 1;
|
||||||
let tweenAlpha = game.add.tween(this);
|
var tweenAlpha = game.add.tween(this);
|
||||||
tweenAlpha.to( { alpha: 0 }, Phaser.Timer.SECOND * 2, Phaser.Easing.Back.In, true);
|
tweenAlpha.to( { alpha: 0 }, Phaser.Timer.SECOND * 2, Phaser.Easing.Back.In, true);
|
||||||
|
|
||||||
game.add.existing(this);
|
game.add.existing(this);
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ var Game = {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
countDown: function() {
|
countDown: function() {
|
||||||
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
this.countDownText = game.add.text(0, 0, "", style);
|
this.countDownText = game.add.text(0, 0, "", style);
|
||||||
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
||||||
this.countDownText.stroke = "#333";
|
this.countDownText.stroke = "#333";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ var Loading = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
// let userID = sessionStorage.getItem("UserID");
|
// var userID = sessionStorage.getItem("UserID");
|
||||||
// console.log("userID : " + userID);
|
// console.log("userID : " + userID);
|
||||||
|
|
||||||
// game.stage.backgroundColor = '#4d4d4d';
|
// game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Card Matching";
|
var CONTENT_ID = "Card Matching";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID,
|
Phaser.CANVAS, CONTENT_ID,
|
||||||
this, false, false
|
this, false, false
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ var Game = {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
countDown: function() {
|
countDown: function() {
|
||||||
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
this.countDownText = game.add.text(0, 0, "", style);
|
this.countDownText = game.add.text(0, 0, "", style);
|
||||||
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
||||||
this.countDownText.stroke = "#333";
|
this.countDownText.stroke = "#333";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ var Loading = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
// let userID = sessionStorage.getItem("UserID");
|
// var userID = sessionStorage.getItem("UserID");
|
||||||
// console.log("userID : " + userID);
|
// console.log("userID : " + userID);
|
||||||
|
|
||||||
// game.stage.backgroundColor = '#4d4d4d';
|
// game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Grilled Meat";
|
var CONTENT_ID = "Grilled Meat";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID,
|
Phaser.CANVAS, CONTENT_ID,
|
||||||
this, false, false
|
this, false, false
|
||||||
|
|||||||
@@ -112,10 +112,10 @@ Alien.prototype.onFired = function() {
|
|||||||
|
|
||||||
Alien.prototype.goRandomPosition = function() {
|
Alien.prototype.goRandomPosition = function() {
|
||||||
// set random position
|
// set random position
|
||||||
const SPAWN_BOX_LEFT = 80;
|
var SPAWN_BOX_LEFT = 80;
|
||||||
const SPAWN_BOX_WIDTH = game.world.width - 160;
|
var SPAWN_BOX_WIDTH = game.world.width - 160;
|
||||||
const SPAWN_BOX_TOP = 280;
|
var SPAWN_BOX_TOP = 280;
|
||||||
const SPAWN_BOX_HEIGHT = game.world.height - 400;
|
var SPAWN_BOX_HEIGHT = game.world.height - 400;
|
||||||
|
|
||||||
this.x = SPAWN_BOX_LEFT + Math.random() * SPAWN_BOX_WIDTH;
|
this.x = SPAWN_BOX_LEFT + Math.random() * SPAWN_BOX_WIDTH;
|
||||||
this.y = SPAWN_BOX_TOP + Math.random() * SPAWN_BOX_HEIGHT;
|
this.y = SPAWN_BOX_TOP + Math.random() * SPAWN_BOX_HEIGHT;
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
let scoreManager = new ScoreManager();
|
var scoreManager = new ScoreManager();
|
||||||
let heartManager = new HeartManager();
|
var heartManager = new HeartManager();
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ var Game = {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
countDown() {
|
countDown() {
|
||||||
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
this.countDownText = game.add.text(0, 0, "", style);
|
this.countDownText = game.add.text(0, 0, "", style);
|
||||||
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
||||||
this.countDownText.stroke = "#333";
|
this.countDownText.stroke = "#333";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ var Loading = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
// let userID = sessionStorage.getItem("UserID");
|
// var userID = sessionStorage.getItem("UserID");
|
||||||
// console.log("userID : " + userID);
|
// console.log("userID : " + userID);
|
||||||
|
|
||||||
// game.stage.backgroundColor = '#4d4d4d';
|
// game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Space Invaders";
|
var CONTENT_ID = "Space Invaders";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID,
|
Phaser.CANVAS, CONTENT_ID,
|
||||||
this, false, false
|
this, false, false
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Ranking";
|
var CONTENT_ID = "Ranking";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID,
|
Phaser.CANVAS, CONTENT_ID,
|
||||||
this, false, false
|
this, false, false
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Result";
|
var CONTENT_ID = "Result";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID
|
Phaser.CANVAS, CONTENT_ID
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ RecordBoard.prototype.printRecordBoardHeader = function() {
|
|||||||
bar.beginFill(0x444444);
|
bar.beginFill(0x444444);
|
||||||
bar.drawRect(0, posY, game.world.width, RecordBoard.HEADER_BAR_HEIGHT_PX);
|
bar.drawRect(0, posY, game.world.width, RecordBoard.HEADER_BAR_HEIGHT_PX);
|
||||||
|
|
||||||
const style = { font: "32px Arial", fill: "#ffc", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "32px Arial", fill: "#ffc", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
this.printHeader(posX, posY, "최근의 내 기록", style);
|
this.printHeader(posX, posY, "최근의 내 기록", style);
|
||||||
|
|
||||||
posX = 320;
|
posX = 320;
|
||||||
@@ -38,8 +38,8 @@ RecordBoard.prototype.printHeader = function(x, y, title, style) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RecordBoard.prototype.printSeperator = function() {
|
RecordBoard.prototype.printSeperator = function() {
|
||||||
const posX = 290;
|
var posX = 290;
|
||||||
const posY = 480;
|
var posY = 480;
|
||||||
|
|
||||||
this.chartGraphics.lineStyle(3, 0x444444, 1);
|
this.chartGraphics.lineStyle(3, 0x444444, 1);
|
||||||
this.chartGraphics.moveTo(posX, posY);
|
this.chartGraphics.moveTo(posX, posY);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ var Result = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
printRecord: function() {
|
printRecord: function() {
|
||||||
const style = { font: "bold 38px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "bold 38px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
var titleText = game.add.text(game.world.width / 2, 35, "결과", style);
|
var titleText = game.add.text(game.world.width / 2, 35, "결과", style);
|
||||||
titleText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
titleText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||||
titleText.anchor.set(0.5);
|
titleText.anchor.set(0.5);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Start";
|
var CONTENT_ID = "Start";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID
|
Phaser.CANVAS, CONTENT_ID
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function ContentProgress() {
|
function ContentProgress() {
|
||||||
let fontStyle = ContentProgress.DEFAULT_TEXT_FONT;
|
var fontStyle = ContentProgress.DEFAULT_TEXT_FONT;
|
||||||
|
|
||||||
fontStyle.align = "right";
|
fontStyle.align = "right";
|
||||||
fontStyle.boundsAlignH = "right";
|
fontStyle.boundsAlignH = "right";
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Typing Practice";
|
var CONTENT_ID = "Typing Practice";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID,
|
Phaser.CANVAS, CONTENT_ID,
|
||||||
this, false, false
|
this, false, false
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ var TypingTest = {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
countDown() {
|
countDown() {
|
||||||
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
var style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
this.countDownText = game.add.text(0, 0, "", style);
|
this.countDownText = game.add.text(0, 0, "", style);
|
||||||
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
||||||
this.countDownText.stroke = "#333";
|
this.countDownText.stroke = "#333";
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "Typing Test";
|
var CONTENT_ID = "Typing Test";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID,
|
Phaser.CANVAS, CONTENT_ID,
|
||||||
this, false, false
|
this, false, false
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Main game
|
// Main game
|
||||||
|
|
||||||
const CONTENT_ID = "WhacAMole";
|
var CONTENT_ID = "WhacAMole";
|
||||||
|
|
||||||
let game = new Phaser.Game(
|
var game = new Phaser.Game(
|
||||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||||
Phaser.CANVAS, CONTENT_ID,
|
Phaser.CANVAS, CONTENT_ID,
|
||||||
this, false, false
|
this, false, false
|
||||||
|
|||||||
Reference in New Issue
Block a user