Fix: typing test app bug, code revised
This commit is contained in:
@@ -162,7 +162,7 @@ function getGameAppName() {
|
|||||||
if(isTypingPracticeApp())
|
if(isTypingPracticeApp())
|
||||||
return "typing_practice";
|
return "typing_practice";
|
||||||
else if(isTypingTestApp())
|
else if(isTypingTestApp())
|
||||||
return "typing_test.html";
|
return "typing_test";
|
||||||
else if(isTypingGameApp()) {
|
else if(isTypingGameApp()) {
|
||||||
if(isKoreanTypingApp())
|
if(isKoreanTypingApp())
|
||||||
return appName.substring("typing_korean_".length);
|
return appName.substring("typing_korean_".length);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
var Loading = {
|
var Loading = {
|
||||||
|
|
||||||
preload: function() {
|
preload: function() {
|
||||||
// this.game.load.image('loadingbar', './image/phaser.png');
|
// game.load.image('loadingbar', './image/phaser.png');
|
||||||
},
|
},
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
// let userID = sessionStorage.getItem("UserID");
|
// let userID = sessionStorage.getItem("UserID");
|
||||||
// console.log("userID : " + userID);
|
// console.log("userID : " + userID);
|
||||||
|
|
||||||
// this.game.stage.backgroundColor = '#4d4d4d';
|
// game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|
||||||
// // Progress report
|
// // Progress report
|
||||||
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
||||||
@@ -20,44 +20,44 @@ var Loading = {
|
|||||||
// this.preloadBar.anchor.setTo(0.5);
|
// this.preloadBar.anchor.setTo(0.5);
|
||||||
// this.preloadBar.alpha = 0;
|
// this.preloadBar.alpha = 0;
|
||||||
|
|
||||||
this.game.load.onFileComplete.add(this.fileComplete, this);
|
game.load.onFileComplete.add(this.fileComplete, this);
|
||||||
this.game.load.onLoadComplete.add(this.loadComplete, this);
|
game.load.onLoadComplete.add(this.loadComplete, this);
|
||||||
|
|
||||||
this.startLoading();
|
this.startLoading();
|
||||||
},
|
},
|
||||||
|
|
||||||
startLoading: function() {
|
startLoading: function() {
|
||||||
this.game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
|
|
||||||
this.game.load.image('star', '../../../resources/image/background/star_7x7.png');
|
game.load.image('star', '../../../resources/image/background/star_7x7.png');
|
||||||
|
|
||||||
this.game.load.image('alien_normal', '../../../resources/image/character/alien/green_alien.png');
|
game.load.image('alien_normal', '../../../resources/image/character/alien/green_alien.png');
|
||||||
|
|
||||||
this.game.load.image('heart_full', '../../../resources/image/ui/heart_full.png');
|
game.load.image('heart_full', '../../../resources/image/ui/heart_full.png');
|
||||||
this.game.load.image('heart_empty', '../../../resources/image/ui/heart_empty.png');
|
game.load.image('heart_empty', '../../../resources/image/ui/heart_empty.png');
|
||||||
// this.game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('a', './image/phaser.png');
|
// game.load.image('a', './image/phaser.png');
|
||||||
// this.game.load.image('b', './image/phaser.png');
|
// game.load.image('b', './image/phaser.png');
|
||||||
// this.game.load.image('c', './image/phaser.png');
|
// game.load.image('c', './image/phaser.png');
|
||||||
// this.game.load.image('d', './image/phaser.png');
|
// game.load.image('d', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('f', './image/phaser.png');
|
// game.load.image('f', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('h', './image/phaser.png');
|
// game.load.image('h', './image/phaser.png');
|
||||||
|
|
||||||
// this.game.load.image('phaser', './image/phaser.png');
|
// game.load.image('phaser', './image/phaser.png');
|
||||||
// this.game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
// game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
||||||
// this.game.load.image('star', './image/star_particle.png');
|
// game.load.image('star', './image/star_particle.png');
|
||||||
// this.game.load.image('medal_gold', './image/medal_gold.png');
|
// game.load.image('medal_gold', './image/medal_gold.png');
|
||||||
// this.game.load.image('medal_silver', './image/medal_silver.png');
|
// game.load.image('medal_silver', './image/medal_silver.png');
|
||||||
// this.game.load.image('medal_bronze', './image/medal_bronze.png');
|
// game.load.image('medal_bronze', './image/medal_bronze.png');
|
||||||
|
|
||||||
this.game.load.start();
|
game.load.start();
|
||||||
},
|
},
|
||||||
|
|
||||||
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ var Result = {
|
|||||||
// top ui
|
// top ui
|
||||||
var screenTopUI = new ScreenTopUI();
|
var screenTopUI = new ScreenTopUI();
|
||||||
screenTopUI.makeBackButton( function() {
|
screenTopUI.makeBackButton( function() {
|
||||||
if(isTypingPracticeStage())
|
if(isTypingPracticeApp())
|
||||||
location.href = '../../web/client/menu_typing_practice.html';
|
location.href = '../../web/client/menu_typing_practice.html';
|
||||||
else if(isTypingTestStage())
|
else if(isTypingTestApp())
|
||||||
location.href = '../../web/client/menu_typing_test.html';
|
location.href = '../../web/client/menu_typing_test.html';
|
||||||
else
|
else
|
||||||
location.href = '../../web/client/menu_app.html';
|
location.href = '../../web/client/menu_app.html';
|
||||||
@@ -153,18 +153,6 @@ var Result = {
|
|||||||
|
|
||||||
restartStage: function() {
|
restartStage: function() {
|
||||||
location.href = "../../web/client/" + getGameAppName() + ".html";
|
location.href = "../../web/client/" + getGameAppName() + ".html";
|
||||||
/*
|
|
||||||
if(isTypingPracticeApp())
|
|
||||||
location.href = "../../web/client/typing_practice.html";
|
|
||||||
else if(isTypingTestApp())
|
|
||||||
location.href = "../../web/client/typing_test.html";
|
|
||||||
else if(isTypingGameApp())
|
|
||||||
location.href = "../../web/client/" + this.getGameAppName() + ".html";
|
|
||||||
// else if(isMouseGameApp())
|
|
||||||
// location.href = "../../web/client/" + this.getGameAppName() + ".html";
|
|
||||||
else
|
|
||||||
location.href = "../../web/client/" + sessionStorageManager.getPlayingAppName() + ".html";
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -163,18 +163,6 @@ var Start = {
|
|||||||
|
|
||||||
startStage: function() {
|
startStage: function() {
|
||||||
location.href = "../../web/client/" + getGameAppName() + ".html";
|
location.href = "../../web/client/" + getGameAppName() + ".html";
|
||||||
/*
|
|
||||||
if(isTypingPracticeApp())
|
|
||||||
location.href = "../../web/client/typing_practice.html";
|
|
||||||
else if(isTypingTestApp())
|
|
||||||
location.href = "../../web/client/typing_test.html";
|
|
||||||
else if(isTypingGameApp())
|
|
||||||
location.href = "../../web/client/" + this.getGameAppName() + ".html";
|
|
||||||
// else if(isMouseGameApp())
|
|
||||||
// location.href = "../../web/client/" + this.getGameAppName() + ".html";
|
|
||||||
else
|
|
||||||
location.href = "../../web/client/" + sessionStorageManager.getPlayingAppName() + ".html";
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -109,6 +109,16 @@ Hand.prototype.unhighlightOffFinger = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Hand.loadResources = function() {
|
||||||
|
game.load.image('hand_palm', '../../../resources/image/ui/hand_palm.png');
|
||||||
|
game.load.image('hand_thumb', '../../../resources/image/ui/hand_thumb.png');
|
||||||
|
game.load.image('hand_index_finger', '../../../resources/image/ui/hand_index_finger.png');
|
||||||
|
game.load.image('hand_middle_finger', '../../../resources/image/ui/hand_middle_finger.png');
|
||||||
|
game.load.image('hand_little_finger', '../../../resources/image/ui/hand_little_finger.png');
|
||||||
|
game.load.image('hand_ring_finger', '../../../resources/image/ui/hand_ring_finger.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Hand.DEFAULT_Y_PX = 540; // 680;
|
Hand.DEFAULT_Y_PX = 540; // 680;
|
||||||
|
|
||||||
|
|
||||||
@@ -260,4 +270,5 @@ RightHand.prototype.moveColumn = function(rowNo, key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RightHand.DEFAULT_X_PX = 810;
|
RightHand.DEFAULT_X_PX = 810;
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
var Loading = {
|
var Loading = {
|
||||||
|
|
||||||
preload: function() {
|
preload: function() {
|
||||||
// this.game.load.image('loadingbar', './image/phaser.png');
|
// game.load.image('loadingbar', './image/phaser.png');
|
||||||
},
|
},
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
// var userID = sessionStorage.getItem("UserID");
|
// var userID = sessionStorage.getItem("UserID");
|
||||||
// console.log("userID : " + userID);
|
// console.log("userID : " + userID);
|
||||||
|
|
||||||
// this.game.stage.backgroundColor = '#4d4d4d';
|
// game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|
||||||
// // Progress report
|
// // Progress report
|
||||||
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
||||||
@@ -20,50 +20,44 @@ var Loading = {
|
|||||||
// this.preloadBar.anchor.setTo(0.5);
|
// this.preloadBar.anchor.setTo(0.5);
|
||||||
// this.preloadBar.alpha = 0;
|
// this.preloadBar.alpha = 0;
|
||||||
|
|
||||||
this.game.load.onFileComplete.add(this.fileComplete, this);
|
game.load.onFileComplete.add(this.fileComplete, this);
|
||||||
this.game.load.onLoadComplete.add(this.loadComplete, this);
|
game.load.onLoadComplete.add(this.loadComplete, this);
|
||||||
|
|
||||||
this.startLoading();
|
this.startLoading();
|
||||||
},
|
},
|
||||||
|
|
||||||
startLoading: function() {
|
startLoading: function() {
|
||||||
this.game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
|
|
||||||
this.game.load.image('hand_palm', '../../../resources/image/ui/hand_palm.png');
|
|
||||||
this.game.load.image('hand_thumb', '../../../resources/image/ui/hand_thumb.png');
|
|
||||||
this.game.load.image('hand_index_finger', '../../../resources/image/ui/hand_index_finger.png');
|
|
||||||
this.game.load.image('hand_middle_finger', '../../../resources/image/ui/hand_middle_finger.png');
|
|
||||||
this.game.load.image('hand_little_finger', '../../../resources/image/ui/hand_little_finger.png');
|
|
||||||
this.game.load.image('hand_ring_finger', '../../../resources/image/ui/hand_ring_finger.png');
|
|
||||||
|
|
||||||
|
Hand.loadResources();
|
||||||
Animal.loadResources();
|
Animal.loadResources();
|
||||||
|
|
||||||
|
|
||||||
// this.game.load.image('hand_left', '../../../resources/image/ui/hand_left.png');
|
// game.load.image('hand_left', '../../../resources/image/ui/hand_left.png');
|
||||||
// this.game.load.image('hand_right', '../../../resources/image/ui/hand_right.png');
|
// game.load.image('hand_right', '../../../resources/image/ui/hand_right.png');
|
||||||
// this.game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('a', './image/phaser.png');
|
// game.load.image('a', './image/phaser.png');
|
||||||
// this.game.load.image('b', './image/phaser.png');
|
// game.load.image('b', './image/phaser.png');
|
||||||
// this.game.load.image('c', './image/phaser.png');
|
// game.load.image('c', './image/phaser.png');
|
||||||
// this.game.load.image('d', './image/phaser.png');
|
// game.load.image('d', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('f', './image/phaser.png');
|
// game.load.image('f', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('h', './image/phaser.png');
|
// game.load.image('h', './image/phaser.png');
|
||||||
|
|
||||||
// this.game.load.image('phaser', './image/phaser.png');
|
// game.load.image('phaser', './image/phaser.png');
|
||||||
// this.game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
// game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
||||||
// this.game.load.image('star', './image/star_particle.png');
|
// game.load.image('star', './image/star_particle.png');
|
||||||
// this.game.load.image('medal_gold', './image/medal_gold.png');
|
// game.load.image('medal_gold', './image/medal_gold.png');
|
||||||
// this.game.load.image('medal_silver', './image/medal_silver.png');
|
// game.load.image('medal_silver', './image/medal_silver.png');
|
||||||
// this.game.load.image('medal_bronze', './image/medal_bronze.png');
|
// game.load.image('medal_bronze', './image/medal_bronze.png');
|
||||||
|
|
||||||
this.game.load.start();
|
game.load.start();
|
||||||
},
|
},
|
||||||
|
|
||||||
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
var Loading = {
|
var Loading = {
|
||||||
|
|
||||||
preload: function() {
|
preload: function() {
|
||||||
// this.game.load.image('loadingbar', './image/phaser.png');
|
// game.load.image('loadingbar', './image/phaser.png');
|
||||||
},
|
},
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
// var userID = sessionStorage.getItem("UserID");
|
// var userID = sessionStorage.getItem("UserID");
|
||||||
// console.log("userID : " + userID);
|
// console.log("userID : " + userID);
|
||||||
|
|
||||||
// this.game.stage.backgroundColor = '#4d4d4d';
|
// game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|
||||||
// // Progress report
|
// // Progress report
|
||||||
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
||||||
@@ -20,41 +20,41 @@ var Loading = {
|
|||||||
// this.preloadBar.anchor.setTo(0.5);
|
// this.preloadBar.anchor.setTo(0.5);
|
||||||
// this.preloadBar.alpha = 0;
|
// this.preloadBar.alpha = 0;
|
||||||
|
|
||||||
this.game.load.onFileComplete.add(this.fileComplete, this);
|
game.load.onFileComplete.add(this.fileComplete, this);
|
||||||
this.game.load.onLoadComplete.add(this.loadComplete, this);
|
game.load.onLoadComplete.add(this.loadComplete, this);
|
||||||
|
|
||||||
this.startLoading();
|
this.startLoading();
|
||||||
},
|
},
|
||||||
|
|
||||||
startLoading: function() {
|
startLoading: function() {
|
||||||
this.game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
|
|
||||||
Animal.loadResources();
|
Animal.loadResources();
|
||||||
|
|
||||||
|
|
||||||
// this.game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('a', './image/phaser.png');
|
// game.load.image('a', './image/phaser.png');
|
||||||
// this.game.load.image('b', './image/phaser.png');
|
// game.load.image('b', './image/phaser.png');
|
||||||
// this.game.load.image('c', './image/phaser.png');
|
// game.load.image('c', './image/phaser.png');
|
||||||
// this.game.load.image('d', './image/phaser.png');
|
// game.load.image('d', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('f', './image/phaser.png');
|
// game.load.image('f', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('h', './image/phaser.png');
|
// game.load.image('h', './image/phaser.png');
|
||||||
|
|
||||||
// this.game.load.image('phaser', './image/phaser.png');
|
// game.load.image('phaser', './image/phaser.png');
|
||||||
// this.game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
// game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
||||||
// this.game.load.image('star', './image/star_particle.png');
|
// game.load.image('star', './image/star_particle.png');
|
||||||
// this.game.load.image('medal_gold', './image/medal_gold.png');
|
// game.load.image('medal_gold', './image/medal_gold.png');
|
||||||
// this.game.load.image('medal_silver', './image/medal_silver.png');
|
// game.load.image('medal_silver', './image/medal_silver.png');
|
||||||
// this.game.load.image('medal_bronze', './image/medal_bronze.png');
|
// game.load.image('medal_bronze', './image/medal_bronze.png');
|
||||||
|
|
||||||
this.game.load.start();
|
game.load.start();
|
||||||
},
|
},
|
||||||
|
|
||||||
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
||||||
|
|||||||
@@ -161,24 +161,17 @@ var TypingPractice = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
initTypingData: function() {
|
initTypingData: function() {
|
||||||
var typingTextMan = new TypingTextManager();
|
this.typingRandomLetters = this.loadLetters();
|
||||||
|
// console.log(this.typingRandomLetters);
|
||||||
var typingPracticeContents = this.loadLetters();
|
this.typingRandomLettersLength = this.typingRandomLetters.length;
|
||||||
// console.log(typingPracticeContents);
|
|
||||||
// typingTextMan.makePracticeContents(typingPracticeContents, 30);
|
|
||||||
// this.typingRandomContents = typingTextMan.getContents();
|
|
||||||
this.typingRandomContents = typingPracticeContents;
|
|
||||||
// console.log(this.typingRandomContents);
|
|
||||||
this.typingContentLength = this.typingRandomContents.length;
|
|
||||||
this.typingIndex = 0;
|
this.typingIndex = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
shuffleLettetFollowingFKey: function(wordList) {
|
shuffleLettetFollowingFKey: function(wordList) {
|
||||||
var typingTextMan = new TypingTextManager();
|
var shuffleLetters = TypingTextManager.shuffledArray(wordList);
|
||||||
|
|
||||||
var letters = [];
|
var letters = [];
|
||||||
var shuffleLetters = typingTextMan.getShuffledArray(wordList);
|
|
||||||
for(var i = 0; i < shuffleLetters.length; i++) {
|
for(var i = 0; i < shuffleLetters.length; i++) {
|
||||||
if(isKoreanTypingApp())
|
if(isKoreanTypingApp())
|
||||||
letters.push("ㄹ");
|
letters.push("ㄹ");
|
||||||
@@ -192,10 +185,9 @@ var TypingPractice = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shuffleLettetFollowingJKey: function(wordList) {
|
shuffleLettetFollowingJKey: function(wordList) {
|
||||||
var typingTextMan = new TypingTextManager();
|
var shuffleLetters = TypingTextManager.shuffledArray(wordList);
|
||||||
|
|
||||||
var letters = [];
|
var letters = [];
|
||||||
var shuffleLetters = typingTextMan.getShuffledArray(wordList);
|
|
||||||
for(var i = 0; i < shuffleLetters.length; i++) {
|
for(var i = 0; i < shuffleLetters.length; i++) {
|
||||||
letters.push(shuffleLetters[i]);
|
letters.push(shuffleLetters[i]);
|
||||||
|
|
||||||
@@ -223,10 +215,9 @@ var TypingPractice = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shuffleLettetFollowingFJKey: function(wordList) {
|
shuffleLettetFollowingFJKey: function(wordList) {
|
||||||
// var typingTextMan = new TypingTextManager();
|
var shuffleLetters = TypingTextManager.shuffledArray(wordList);
|
||||||
|
|
||||||
var letters = [];
|
var letters = [];
|
||||||
var shuffleLetters = TypingTextManager.shuffledArray(wordList);
|
|
||||||
for(var i = 0; i < shuffleLetters.length; i++) {
|
for(var i = 0; i < shuffleLetters.length; i++) {
|
||||||
if(this.isLeftHandLetter(shuffleLetters[i])) {
|
if(this.isLeftHandLetter(shuffleLetters[i])) {
|
||||||
letters.push(shuffleLetters[i]);
|
letters.push(shuffleLetters[i]);
|
||||||
@@ -266,7 +257,7 @@ var TypingPractice = {
|
|||||||
allLetters = allLetters.concat(englishLeftUpperWordList);
|
allLetters = allLetters.concat(englishLeftUpperWordList);
|
||||||
allLetters = allLetters.concat(englishRightUpperWordList);
|
allLetters = allLetters.concat(englishRightUpperWordList);
|
||||||
allLetters = allLetters.concat(englishLeftLowerWordList);
|
allLetters = allLetters.concat(englishLeftLowerWordList);
|
||||||
allLetters = allLetters.concat(["m"); // englishRightLowerWordList);
|
allLetters = allLetters.concat(["m"]); // englishRightLowerWordList);
|
||||||
allLetters = allLetters.concat(englishSecondFingerWordList);
|
allLetters = allLetters.concat(englishSecondFingerWordList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,14 +269,16 @@ var TypingPractice = {
|
|||||||
var letters = [];
|
var letters = [];
|
||||||
|
|
||||||
if(isKoreanTypingApp()) {
|
if(isKoreanTypingApp()) {
|
||||||
letters = letters.concat(["ㄹ", "ㅓ"]);
|
letters = letters.concat(["ㄹ", "ㅓ", "ㄹ", "ㅓ", "ㄹ", "ㅓ"]);
|
||||||
letters = letters.concat(this.shuffleLettetFollowingJKey(koreanBasicLeftWordList));
|
letters = letters.concat(this.shuffleLettetFollowingJKey(koreanBasicLeftWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingFKey(koreanBasicRightWordList));
|
letters = letters.concat(this.shuffleLettetFollowingFKey(koreanBasicRightWordList));
|
||||||
|
|
||||||
|
letters = letters.concat(["ㄹ", "ㅓ", "ㄹ", "ㅓ", "ㄹ", "ㅓ"]);
|
||||||
letters = letters.concat(this.shuffleLettetFollowingJKey(koreanLeftUpperWordList));
|
letters = letters.concat(this.shuffleLettetFollowingJKey(koreanLeftUpperWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingFKey(koreanRightUpperWordList));
|
letters = letters.concat(this.shuffleLettetFollowingFKey(koreanRightUpperWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingJKey(koreanLeftLowerWordList));
|
letters = letters.concat(this.shuffleLettetFollowingJKey(koreanLeftLowerWordList));
|
||||||
|
|
||||||
|
letters = letters.concat(["ㄹ", "ㅓ", "ㄹ", "ㅓ", "ㄹ", "ㅓ"]);
|
||||||
// letters = letters.concat(this.shuffleLettetFollowingFKey(koreanRightLowerWordList));
|
// letters = letters.concat(this.shuffleLettetFollowingFKey(koreanRightLowerWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingFJKey(koreanSecondFingerWordList.concat("ㅡ")));
|
letters = letters.concat(this.shuffleLettetFollowingFJKey(koreanSecondFingerWordList.concat("ㅡ")));
|
||||||
|
|
||||||
@@ -298,14 +291,16 @@ var TypingPractice = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // isEnglishTypingApp
|
else { // isEnglishTypingApp
|
||||||
letters = letters.concat(["f", "j"]);
|
letters = letters.concat(["f", "j", "f", "j", "f", "j"]);
|
||||||
letters = letters.concat(this.shuffleLettetFollowingJKey(englishBasicLeftWordList));
|
letters = letters.concat(this.shuffleLettetFollowingJKey(englishBasicLeftWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingFKey(englishBasicRightWordList));
|
letters = letters.concat(this.shuffleLettetFollowingFKey(englishBasicRightWordList));
|
||||||
|
|
||||||
|
letters = letters.concat(["f", "j", "f", "j", "f", "j"]);
|
||||||
letters = letters.concat(this.shuffleLettetFollowingJKey(englishLeftUpperWordList));
|
letters = letters.concat(this.shuffleLettetFollowingJKey(englishLeftUpperWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingFKey(englishRightUpperWordList));
|
letters = letters.concat(this.shuffleLettetFollowingFKey(englishRightUpperWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingJKey(englishLeftLowerWordList));
|
letters = letters.concat(this.shuffleLettetFollowingJKey(englishLeftLowerWordList));
|
||||||
|
|
||||||
|
letters = letters.concat(["f", "j", "f", "j", "f", "j"]);
|
||||||
// letters = letters.concat(this.shuffleLettetFollowingFKey(englishRightLowerWordList));
|
// letters = letters.concat(this.shuffleLettetFollowingFKey(englishRightLowerWordList));
|
||||||
letters = letters.concat(this.shuffleLettetFollowingFJKey(englishSecondFingerWordList.concat("m")));
|
letters = letters.concat(this.shuffleLettetFollowingFJKey(englishSecondFingerWordList.concat("m")));
|
||||||
|
|
||||||
@@ -317,8 +312,7 @@ var TypingPractice = {
|
|||||||
letters = letters.concat(this.suffleAllLetters());
|
letters = letters.concat(this.suffleAllLetters());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// console.log(letters);
|
||||||
console.log(letters);
|
|
||||||
|
|
||||||
return letters;
|
return letters;
|
||||||
},
|
},
|
||||||
@@ -329,28 +323,28 @@ var TypingPractice = {
|
|||||||
if(doneIndex < 0) {
|
if(doneIndex < 0) {
|
||||||
this.textTypingContentsDone[i].text = "";
|
this.textTypingContentsDone[i].text = "";
|
||||||
} else {
|
} else {
|
||||||
this.textTypingContentsDone[i].text = this.typingRandomContents[doneIndex];
|
this.textTypingContentsDone[i].text = this.typingRandomLetters[doneIndex];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.typingIndex == this.typingContentLength) {
|
if(this.typingIndex == this.typingRandomLettersLength) {
|
||||||
this.textTypingContent.text = "";
|
this.textTypingContent.text = "";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.textTypingContent.text = this.typingRandomContents[this.typingIndex];
|
this.textTypingContent.text = this.typingRandomLetters[this.typingIndex];
|
||||||
|
|
||||||
for(var i = 0; i < TypingPractice.TYPING_CONTENT_PREVIEW_COUNT; i++) {
|
for(var i = 0; i < TypingPractice.TYPING_CONTENT_PREVIEW_COUNT; i++) {
|
||||||
var previewIndex = this.typingIndex + i + 1;
|
var previewIndex = this.typingIndex + i + 1;
|
||||||
if(previewIndex < this.typingRandomContents.length)
|
if(previewIndex < this.typingRandomLetters.length)
|
||||||
this.textTypingContentPreview[i].text = this.typingRandomContents[previewIndex];
|
this.textTypingContentPreview[i].text = this.typingRandomLetters[previewIndex];
|
||||||
else
|
else
|
||||||
this.textTypingContentPreview[i].text = "";
|
this.textTypingContentPreview[i].text = "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
hideHighlightKey: function() {
|
hideHighlightKey: function() {
|
||||||
var prevText = this.typingRandomContents[this.typingIndex];
|
var prevText = this.typingRandomLetters[this.typingIndex];
|
||||||
if(prevText === undefined)
|
if(prevText === undefined)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -358,7 +352,7 @@ var TypingPractice = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
showHighlightKey: function() {
|
showHighlightKey: function() {
|
||||||
var typingText = this.typingRandomContents[this.typingIndex];
|
var typingText = this.typingRandomLetters[this.typingIndex];
|
||||||
if(typingText === undefined)
|
if(typingText === undefined)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -387,7 +381,7 @@ var TypingPractice = {
|
|||||||
|
|
||||||
checkTypingContents: function(evnet) {
|
checkTypingContents: function(evnet) {
|
||||||
var inputContent = event.key;
|
var inputContent = event.key;
|
||||||
var typingContent = this.typingRandomContents[this.typingIndex];
|
var typingContent = this.typingRandomLetters[this.typingIndex];
|
||||||
|
|
||||||
if(this.isKeyPressed(inputContent, typingContent)) {
|
if(this.isKeyPressed(inputContent, typingContent)) {
|
||||||
// this.typingScore.increase();
|
// this.typingScore.increase();
|
||||||
@@ -395,7 +389,7 @@ var TypingPractice = {
|
|||||||
|
|
||||||
this.playNextContent();
|
this.playNextContent();
|
||||||
|
|
||||||
if(this.typingIndex === this.typingContentLength) {
|
if(this.typingIndex === this.typingRandomLettersLength) {
|
||||||
// this.goResult();
|
// this.goResult();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
var Loading = {
|
var Loading = {
|
||||||
|
|
||||||
preload: function() {
|
preload: function() {
|
||||||
// this.game.load.image('loadingbar', './image/phaser.png');
|
// game.load.image('loadingbar', './image/phaser.png');
|
||||||
},
|
},
|
||||||
|
|
||||||
create: function() {
|
create: function() {
|
||||||
// var userID = sessionStorage.getItem("UserID");
|
// var userID = sessionStorage.getItem("UserID");
|
||||||
// console.log("userID : " + userID);
|
// console.log("userID : " + userID);
|
||||||
|
|
||||||
// this.game.stage.backgroundColor = '#4d4d4d';
|
// game.stage.backgroundColor = '#4d4d4d';
|
||||||
|
|
||||||
// // Progress report
|
// // Progress report
|
||||||
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
||||||
@@ -20,50 +20,44 @@ var Loading = {
|
|||||||
// this.preloadBar.anchor.setTo(0.5);
|
// this.preloadBar.anchor.setTo(0.5);
|
||||||
// this.preloadBar.alpha = 0;
|
// this.preloadBar.alpha = 0;
|
||||||
|
|
||||||
this.game.load.onFileComplete.add(this.fileComplete, this);
|
game.load.onFileComplete.add(this.fileComplete, this);
|
||||||
this.game.load.onLoadComplete.add(this.loadComplete, this);
|
game.load.onLoadComplete.add(this.loadComplete, this);
|
||||||
|
|
||||||
this.startLoading();
|
this.startLoading();
|
||||||
},
|
},
|
||||||
|
|
||||||
startLoading: function() {
|
startLoading: function() {
|
||||||
this.game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
|
|
||||||
this.game.load.image('hand_palm', '../../../resources/image/ui/hand_palm.png');
|
// Hand.loadResources();
|
||||||
this.game.load.image('hand_thumb', '../../../resources/image/ui/hand_thumb.png');
|
// Animal.loadResources();
|
||||||
this.game.load.image('hand_index_finger', '../../../resources/image/ui/hand_index_finger.png');
|
|
||||||
this.game.load.image('hand_middle_finger', '../../../resources/image/ui/hand_middle_finger.png');
|
|
||||||
this.game.load.image('hand_little_finger', '../../../resources/image/ui/hand_little_finger.png');
|
|
||||||
this.game.load.image('hand_ring_finger', '../../../resources/image/ui/hand_ring_finger.png');
|
|
||||||
|
|
||||||
Animal.loadResources();
|
|
||||||
|
|
||||||
|
|
||||||
// this.game.load.image('hand_left', '../../../resources/image/ui/hand_left.png');
|
// game.load.image('hand_left', '../../../resources/image/ui/hand_left.png');
|
||||||
// this.game.load.image('hand_right', '../../../resources/image/ui/hand_right.png');
|
// game.load.image('hand_right', '../../../resources/image/ui/hand_right.png');
|
||||||
// this.game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
// game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
|
||||||
// this.game.load.image('a', './image/phaser.png');
|
// game.load.image('a', './image/phaser.png');
|
||||||
// this.game.load.image('b', './image/phaser.png');
|
// game.load.image('b', './image/phaser.png');
|
||||||
// this.game.load.image('c', './image/phaser.png');
|
// game.load.image('c', './image/phaser.png');
|
||||||
// this.game.load.image('d', './image/phaser.png');
|
// game.load.image('d', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('e', './image/phaser.png');
|
// game.load.image('e', './image/phaser.png');
|
||||||
// this.game.load.image('f', './image/phaser.png');
|
// game.load.image('f', './image/phaser.png');
|
||||||
// this.game.load.image('g', './image/phaser.png');
|
// game.load.image('g', './image/phaser.png');
|
||||||
// this.game.load.image('h', './image/phaser.png');
|
// game.load.image('h', './image/phaser.png');
|
||||||
|
|
||||||
// this.game.load.image('phaser', './image/phaser.png');
|
// game.load.image('phaser', './image/phaser.png');
|
||||||
// this.game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
// game.load.spritesheet('button', './image/button_basic.png', 200, 100);
|
||||||
// this.game.load.image('star', './image/star_particle.png');
|
// game.load.image('star', './image/star_particle.png');
|
||||||
// this.game.load.image('medal_gold', './image/medal_gold.png');
|
// game.load.image('medal_gold', './image/medal_gold.png');
|
||||||
// this.game.load.image('medal_silver', './image/medal_silver.png');
|
// game.load.image('medal_silver', './image/medal_silver.png');
|
||||||
// this.game.load.image('medal_bronze', './image/medal_bronze.png');
|
// game.load.image('medal_bronze', './image/medal_bronze.png');
|
||||||
|
|
||||||
this.game.load.start();
|
game.load.start();
|
||||||
},
|
},
|
||||||
|
|
||||||
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
||||||
|
|||||||
Reference in New Issue
Block a user