Add: Typing Examination - basic files

This commit is contained in:
2019-06-20 17:32:22 +09:00
parent fb183ac525
commit b9ca4a0ba9
9 changed files with 1138 additions and 3 deletions
+21 -3
View File
@@ -35,6 +35,23 @@ TypingContentBG.prototype.makeTestContentBG = function() {
}
}
TypingContentBG.prototype.makeExaminationContentBG = function() {
var contentY = TypingContentBG.POS_Y_CONTENT_BOX_TYPING_EXAMINATION;
var bar = game.add.graphics();
if(isKoreanTypingApp()) {
bar.beginFill(TypingContentBG.COLOR_CONTENT_BG, 1);
bar.drawRect(0, contentY, GAME_SCREEN_SIZE.x, 70);
} else {
bar.beginFill(TypingContentBG.COLOR_CONTENT_BG, 1);
bar.drawRect(0, contentY, GAME_SCREEN_SIZE.x, 20);
bar.beginFill(TypingContentBG.COLOR_CONTENT_ALPHABET_BG, 1);
bar.drawRect(0, contentY + 20, GAME_SCREEN_SIZE.x, 40);
bar.beginFill(TypingContentBG.COLOR_CONTENT_BG, 1);
bar.drawRect(0, contentY + 55, GAME_SCREEN_SIZE.x, 10);
}
}
TypingContentBG.prototype.makeWhacAMoleContentBG = function() {
var contentY = TypingContentBG.POS_Y_CONTENT_BOX_TYPING_WHACAMOLE;
@@ -56,6 +73,7 @@ TypingContentBG.prototype.makeWhacAMoleContentBG = function() {
TypingContentBG.COLOR_CONTENT_BG = 0x444444;
TypingContentBG.COLOR_CONTENT_ALPHABET_BG = 0x3d3d3d;
TypingContentBG.POS_Y_CONTENT_BOX_TYPING_PRACTICE = 140;
TypingContentBG.POS_Y_CONTENT_BOX_TYPING_TEST = 195; // 260;
TypingContentBG.POS_Y_CONTENT_BOX_TYPING_WHACAMOLE = 200;
TypingContentBG.POS_Y_CONTENT_BOX_TYPING_PRACTICE = 140;
TypingContentBG.POS_Y_CONTENT_BOX_TYPING_TEST = 195; // 260;
TypingContentBG.POS_Y_CONTENT_BOX_TYPING_EXAMINATION = 300;
TypingContentBG.POS_Y_CONTENT_BOX_TYPING_WHACAMOLE = 200;
@@ -98,6 +98,12 @@ TypingTextManager.prototype.makeTestContents = function(arr) {
this.add(this.getShuffledArray(arr));
}
TypingTextManager.prototype.makeExaminationContents = function(arr) {
this.init();
// getExaminationArray : slice too long sentence by proper words and last space
this.add(arr);
}
TypingTextManager.shuffledArray = function(arr) {