Fix: IE10 bug - let, const -> var
This commit is contained in:
@@ -56,7 +56,7 @@ Animal.prototype.stopAnimation = function() {
|
||||
|
||||
|
||||
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))
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ function AnnounceBox(x, y) {
|
||||
}
|
||||
|
||||
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,
|
||||
text, style
|
||||
);
|
||||
@@ -35,7 +35,7 @@ AnnounceBox.prototype.drawBox = function(text) {
|
||||
this.graphics.lineTo(0, 50);
|
||||
this.graphics.endFill();
|
||||
|
||||
let announceText = this.drawText(
|
||||
var announceText = this.drawText(
|
||||
game.world.width / 2, this.posY - 75,
|
||||
text
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@ BackButton.prototype = Object.create(RoundRectButton);
|
||||
BackButton.constructor = BackButton;
|
||||
|
||||
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.boundsAlignV = "middle"; // top, middle, bottom
|
||||
setting.strokeWidthPx = 3;
|
||||
|
||||
@@ -2,7 +2,7 @@ HomeButton.prototype = Object.create(RoundRectButton);
|
||||
HomeButton.constructor = HomeButton;
|
||||
|
||||
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.boundsAlignV = "middle"; // top, middle, bottom
|
||||
setting.strokeWidthPx = 3;
|
||||
|
||||
@@ -33,7 +33,7 @@ Chart.prototype.drawRecordGraph = function(index, date, bestRecord, min, max) {
|
||||
}
|
||||
|
||||
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(
|
||||
posX, posY,
|
||||
|
||||
+19
-19
@@ -2,7 +2,7 @@ function StringUtil() {
|
||||
}
|
||||
|
||||
StringUtil.printMonthDay = function(date) {
|
||||
// let dateTime = new Date(date);
|
||||
// var dateTime = new Date(date);
|
||||
var a = date.split(" ");
|
||||
var d = a[0].split("-");
|
||||
var t = "0:0:0".split(":");
|
||||
@@ -13,13 +13,13 @@ StringUtil.printMonthDay = function(date) {
|
||||
}
|
||||
|
||||
StringUtil.getRecordTextWithoutUnit = function(value) {
|
||||
let number = Math.floor(value);
|
||||
var number = Math.floor(value);
|
||||
return NumberUtil.numberWithCommas(number);
|
||||
}
|
||||
|
||||
StringUtil.getRecordTextWithUnit = function(value) {
|
||||
let number = Math.floor(value);
|
||||
let numberWithCommas = NumberUtil.numberWithCommas(number);
|
||||
var number = Math.floor(value);
|
||||
var numberWithCommas = NumberUtil.numberWithCommas(number);
|
||||
|
||||
if(isTypingGame())
|
||||
return numberWithCommas + " 타";
|
||||
@@ -28,21 +28,21 @@ StringUtil.getRecordTextWithUnit = function(value) {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
StringUtil.toKoreanAlphabets = function(text) {
|
||||
const cCho = [ 'ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
||||
const cJung = [ 'ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅠ', 'ㅡ', 'ㅢ', 'ㅣ' ];
|
||||
const cJong = [ '', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ', 'ㅂ', 'ㅄ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
||||
var cCho = [ 'ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
||||
var cJung = [ 'ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅠ', 'ㅡ', 'ㅢ', 'ㅣ' ];
|
||||
var cJong = [ '', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ', 'ㅂ', 'ㅄ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' ];
|
||||
|
||||
let cho, jung, jong;
|
||||
let str = text;
|
||||
let cnt = str.length;
|
||||
let chars = [], cCode;
|
||||
var cho, jung, jong;
|
||||
var str = text;
|
||||
var cnt = str.length;
|
||||
var chars = [], cCode;
|
||||
|
||||
for (let i = 0; i < cnt; i++) {
|
||||
for (var i = 0; i < cnt; i++) {
|
||||
cCode = str.charCodeAt(i);
|
||||
// if (cCode == 32) { continue; } // 한글이 아닌 경우
|
||||
if (cCode < 0xAC00 || cCode > 0xD7A3) {
|
||||
@@ -63,21 +63,21 @@ StringUtil.toKoreanAlphabets = function(text) {
|
||||
};
|
||||
|
||||
StringUtil.getUnicodeAlphabetCount = function(text) {
|
||||
let chars = StringUtil.toKoreanAlphabets(text);
|
||||
var chars = StringUtil.toKoreanAlphabets(text);
|
||||
// console.log('char : ' + chars);
|
||||
|
||||
let doubleJaum = [
|
||||
var doubleJaum = [
|
||||
'ㄲ', 'ㅉ', 'ㄸ', 'ㄲ', 'ㅆ',
|
||||
'ㄳ', 'ㄵ', 'ㄶ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅄ'
|
||||
];
|
||||
let doubleMoum = [
|
||||
var doubleMoum = [
|
||||
'ㅒ', 'ㅖ',
|
||||
'ㅘ', 'ㅙ', 'ㅚ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅢ'
|
||||
];
|
||||
|
||||
let alphabetCount = 0;
|
||||
let alphabet;
|
||||
for(let i = 0; i < chars.length; i++) {
|
||||
var alphabetCount = 0;
|
||||
var alphabet;
|
||||
for(var i = 0; i < chars.length; i++) {
|
||||
alphabet = chars[i];
|
||||
if(doubleJaum.indexOf(alphabet) > -1 || doubleMoum.indexOf(alphabet) > -1) {
|
||||
// console.log('double alphabet : ' + alphabet);
|
||||
|
||||
Reference in New Issue
Block a user