Fix: typing exam stage redesign
This commit is contained in:
@@ -164,7 +164,7 @@ AnimalRecordList.ALPHA_INACTIVE = 0.3;
|
|||||||
|
|
||||||
|
|
||||||
AnimalRecordList.ANIMAL_LIST_MENU_POS_Y = 690; // 70; //640;
|
AnimalRecordList.ANIMAL_LIST_MENU_POS_Y = 690; // 70; //640;
|
||||||
AnimalRecordList.ANIMAL_LIST_EXAM_POS_Y = 638;
|
AnimalRecordList.ANIMAL_LIST_EXAM_POS_Y = 60; // 638;
|
||||||
AnimalRecordList.ANIMAL_OFFSET_Y = 30;
|
AnimalRecordList.ANIMAL_OFFSET_Y = 30;
|
||||||
AnimalRecordList.RECORD_TEXT_MENU_OFFSET_Y = 35;
|
AnimalRecordList.RECORD_TEXT_MENU_OFFSET_Y = 35;
|
||||||
AnimalRecordList.COLOR_SCORE_MENU_DEFAULT_TEXT = MainColor.OLD_LACE_STRING;
|
AnimalRecordList.COLOR_SCORE_MENU_DEFAULT_TEXT = MainColor.OLD_LACE_STRING;
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ TypingExamButton.prototype.clickEvent = function() {
|
|||||||
|
|
||||||
sessionStorageManager.setPlayingAppID(200);
|
sessionStorageManager.setPlayingAppID(200);
|
||||||
sessionStorageManager.setPlayingAppName("typing_exam");
|
sessionStorageManager.setPlayingAppName("typing_exam");
|
||||||
sessionStorageManager.setPlayingAppKoreanName("타자검정");
|
sessionStorageManager.setPlayingAppKoreanName("긴글 시험");
|
||||||
sessionStorageManager.setWritingID(this.writingID);
|
sessionStorageManager.setWritingID(this.writingID);
|
||||||
|
|
||||||
if(isExperiencePlayerAccount())
|
if(isExperiencePlayerAccount())
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ MainMenu.prototype.makePlayAppDataList = function(appData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MainMenu.prototype.updateTypingPracticeAppButtons = function(appGroup, appData) {
|
MainMenu.prototype.updateTypingPracticeAppButtons = function(appGroup, appData) {
|
||||||
console.log("updateTypingPracticeAppButtons");
|
// console.log("updateTypingPracticeAppButtons");
|
||||||
|
|
||||||
var buttonIndex = 0;
|
var buttonIndex = 0;
|
||||||
var appDataList = this.makeTypingPracticeAppDataList(appGroup, appData);
|
var appDataList = this.makeTypingPracticeAppDataList(appGroup, appData);
|
||||||
@@ -529,7 +529,7 @@ MainMenu.prototype.makeAppGroupTab = function() {
|
|||||||
(function() { this.onClickTypingExamGroupTab(); }).bind(this)
|
(function() { this.onClickTypingExamGroupTab(); }).bind(this)
|
||||||
);
|
);
|
||||||
this.typingExamGroupTab.reserveIcon("keyboard");
|
this.typingExamGroupTab.reserveIcon("keyboard");
|
||||||
this.typingExamGroupTab.reserveSubText("긴글 연습");
|
this.typingExamGroupTab.reserveSubText("긴글 (시험)");
|
||||||
this.appGroupTabLayout.add(this.typingExamGroupTab);
|
this.appGroupTabLayout.add(this.typingExamGroupTab);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -59,6 +59,14 @@ TypingExamination.prototype.create = function() {
|
|||||||
|
|
||||||
this.averageTypingSpeedText = new AverageTypingSpeed();
|
this.averageTypingSpeedText = new AverageTypingSpeed();
|
||||||
|
|
||||||
|
this.stageTimer = new StageTimer(
|
||||||
|
TypingExamination.GAME_TIME_SEC,
|
||||||
|
(function() {
|
||||||
|
// this.setClickEnable(false);
|
||||||
|
this.timeOver();
|
||||||
|
}).bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// bottom ui
|
// bottom ui
|
||||||
var screenBottomUI = new ScreenBottomUI();
|
var screenBottomUI = new ScreenBottomUI();
|
||||||
@@ -85,16 +93,19 @@ TypingExamination.prototype.fontLoaded = function() {
|
|||||||
graphics.lineStyle(1, 0x303030, 1);
|
graphics.lineStyle(1, 0x303030, 1);
|
||||||
|
|
||||||
|
|
||||||
var TYPING_CONTENT_X = 50;
|
var TYPING_CONTENT_X = 150; // 50;
|
||||||
var TYPING_CONTENT_Y = 320; // 390;
|
var TYPING_CONTENT_Y = 380;
|
||||||
var RECORD_POSITION_X = 990;
|
var RECORD_POSITION_X = 130; //990;
|
||||||
|
|
||||||
var INPUT_TEXT_OFFSET_X = 10;
|
var INPUT_TEXT_OFFSET_X = 10;
|
||||||
var INPUT_TEXT_OFFSET_Y = 60;
|
var INPUT_TEXT_OFFSET_Y = 60;
|
||||||
|
|
||||||
var FONT_SIZE = 26;
|
var FONT_SIZE = 26;
|
||||||
var BIG_FONT_SIZE = 28;
|
var BIG_FONT_SIZE = 28;
|
||||||
var TYPING_TEXT_OFFSET_HEIGHT = 46;
|
var TYPING_TEXT_OFFSET_HEIGHT = 50; //46;
|
||||||
|
|
||||||
|
var TYPING_OFFSET_Y = 60;
|
||||||
|
var TYPING_PREVIEW_OFFSET_Y = 70;
|
||||||
|
|
||||||
// textStyleBasic.font = "bold 38px Arial";
|
// textStyleBasic.font = "bold 38px Arial";
|
||||||
// textStyleBasic.backgroundColor = "rgba(0, 0, 0, 0.25)";
|
// textStyleBasic.backgroundColor = "rgba(0, 0, 0, 0.25)";
|
||||||
@@ -154,8 +165,6 @@ TypingExamination.prototype.fontLoaded = function() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
var TYPING_OFFSET_Y = 60;
|
|
||||||
var TYPING_PREVIEW_OFFSET_Y = 70;
|
|
||||||
// textStyleBasic.font = "38px Arial";
|
// textStyleBasic.font = "38px Arial";
|
||||||
textStyleBasic.backgroundColor = null;
|
textStyleBasic.backgroundColor = null;
|
||||||
|
|
||||||
@@ -200,6 +209,7 @@ TypingExamination.prototype.fontLoaded = function() {
|
|||||||
var textPreviewColor = [ '#999999', '#888888', '#777777', '#666666' ];
|
var textPreviewColor = [ '#999999', '#888888', '#777777', '#666666' ];
|
||||||
// var textPreviewColor = [ '#999999', '#999999', '#999999', '#999999' ];
|
// var textPreviewColor = [ '#999999', '#999999', '#999999', '#999999' ];
|
||||||
this.textTypingContentPreview = [];
|
this.textTypingContentPreview = [];
|
||||||
|
this.textLineNumber = [];
|
||||||
for(var i = 0; i < TypingExamination.TYPING_CONTENT_PREVIEW_COUNT; i++) {
|
for(var i = 0; i < TypingExamination.TYPING_CONTENT_PREVIEW_COUNT; i++) {
|
||||||
graphics.moveTo(
|
graphics.moveTo(
|
||||||
TYPING_CONTENT_X,
|
TYPING_CONTENT_X,
|
||||||
@@ -220,6 +230,16 @@ TypingExamination.prototype.fontLoaded = function() {
|
|||||||
.addColor(textPreviewColor[i], 0);
|
.addColor(textPreviewColor[i], 0);
|
||||||
this.textTypingContentPreview[i].anchor.set(0, 0.5);
|
this.textTypingContentPreview[i].anchor.set(0, 0.5);
|
||||||
this.textTypingContentPreview[i].fontSize = FONT_SIZE;
|
this.textTypingContentPreview[i].fontSize = FONT_SIZE;
|
||||||
|
|
||||||
|
this.textLineNumber[i] = game.add.text(
|
||||||
|
RECORD_POSITION_X,
|
||||||
|
TYPING_CONTENT_Y + TYPING_OFFSET_Y + TYPING_PREVIEW_OFFSET_Y + i * TYPING_TEXT_OFFSET_HEIGHT,
|
||||||
|
"", textStyleBasic
|
||||||
|
)
|
||||||
|
// .setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2)
|
||||||
|
// .addColor(textDoneColor[i], 0);
|
||||||
|
this.textLineNumber[i].anchor.set(1, 0.5);
|
||||||
|
this.textLineNumber[i].fontSize = FONT_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -295,6 +315,8 @@ TypingExamination.prototype.startGame = function() {
|
|||||||
|
|
||||||
this.showTypingExaminationContents();
|
this.showTypingExaminationContents();
|
||||||
this.showPlayingWordNumber();
|
this.showPlayingWordNumber();
|
||||||
|
|
||||||
|
this.stageTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
TypingExamination.prototype.timeOver = function() {
|
TypingExamination.prototype.timeOver = function() {
|
||||||
@@ -305,6 +327,8 @@ TypingExamination.prototype.timeOver = function() {
|
|||||||
TypingExamination.prototype.gameOver = function() {
|
TypingExamination.prototype.gameOver = function() {
|
||||||
var missionClearText = new MissionClearText();
|
var missionClearText = new MissionClearText();
|
||||||
this.stopAndGoResult();
|
this.stopAndGoResult();
|
||||||
|
|
||||||
|
this.stageTimer.pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
TypingExamination.prototype.stopAndGoResult = function() {
|
TypingExamination.prototype.stopAndGoResult = function() {
|
||||||
@@ -439,7 +463,10 @@ TypingExamination.prototype.showTypingExaminationContents = function() {
|
|||||||
this.textTypingRecordsDone[i].text = "";
|
this.textTypingRecordsDone[i].text = "";
|
||||||
} else {
|
} else {
|
||||||
this.textTypingContentsDone[i].text = this.typingExaminationContents[doneIndex];
|
this.textTypingContentsDone[i].text = this.typingExaminationContents[doneIndex];
|
||||||
this.textTypingRecordsDone[i].text = NumberUtil.getRecordText(Math.floor(this.typingRecordForLines[doneIndex]));
|
// this.textTypingRecordsDone[i].text = NumberUtil.getRecordText(Math.floor(this.typingRecordForLines[doneIndex]));
|
||||||
|
|
||||||
|
var lineNumber = this.typingContentLength - doneIndex;
|
||||||
|
this.textTypingRecordsDone[i].text = NumberUtil.numberWithCommas(lineNumber) + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -457,8 +484,13 @@ TypingExamination.prototype.showTypingExaminationContents = function() {
|
|||||||
if(previewIndex < this.typingExaminationContents.length) {
|
if(previewIndex < this.typingExaminationContents.length) {
|
||||||
var previewText = this.typingExaminationContents[previewIndex];
|
var previewText = this.typingExaminationContents[previewIndex];
|
||||||
this.textTypingContentPreview[i].text = previewText;
|
this.textTypingContentPreview[i].text = previewText;
|
||||||
} else
|
|
||||||
|
var lineNumber = this.typingContentLength - this.typingIndex - 1 - i;
|
||||||
|
this.textLineNumber[i].text = NumberUtil.numberWithCommas(lineNumber) + " ";
|
||||||
|
} else {
|
||||||
this.textTypingContentPreview[i].text = "";
|
this.textTypingContentPreview[i].text = "";
|
||||||
|
this.textLineNumber[i].text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,8 +632,8 @@ TypingExamination.prototype.playNextContent = function() {
|
|||||||
|
|
||||||
TypingExamination.prototype.showPlayingWordNumber = function() {
|
TypingExamination.prototype.showPlayingWordNumber = function() {
|
||||||
var currentLine = this.typingIndex + 1;
|
var currentLine = this.typingIndex + 1;
|
||||||
this.textTypingLine.text = currentLine + " / " + this.typingContentLength + " 줄";
|
// this.textTypingLine.text = "#" + (this.typingContentLength - this.typingIndex);
|
||||||
// this.textTypingLine.text = "9,999/9,999 줄";
|
this.textTypingLine.text = this.typingContentLength - this.typingIndex + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
TypingExamination.prototype.setTimeTypingStart = function() {
|
TypingExamination.prototype.setTimeTypingStart = function() {
|
||||||
@@ -624,7 +656,8 @@ TypingExamination.prototype.setTimeTypingStart = function() {
|
|||||||
|
|
||||||
TypingExamination.GAME_TIME_SEC = 60 * 5; // 5 minutes
|
TypingExamination.GAME_TIME_SEC = 60 * 5; // 5 minutes
|
||||||
|
|
||||||
TypingExamination.SPACE_INDICATOR = "ˇ"; // "ᵔ"; // "ᵕ"; // "ˣ"; // "ᵛ"; // " · ";
|
TypingExamination.SPACE_INDICATOR = "␣"; // "ˇ"; // "ᵔ"; // "ᵕ"; // "ˣ"; // "ᵛ"; // " · ";
|
||||||
|
TypingExamination.ENTER_INDICATOR = "⏎"; // "↵"; // "↵";
|
||||||
|
|
||||||
TypingExamination.TYPING_CONTENT_PREVIEW_COUNT = 4; // 3;
|
TypingExamination.TYPING_CONTENT_PREVIEW_COUNT = 4; // 3;
|
||||||
TypingExamination.TYPING_CONTENT_DONE_COUNT = 4; // 3;
|
TypingExamination.TYPING_CONTENT_DONE_COUNT = 4; // 3;
|
||||||
|
|||||||
+1
-1
@@ -607,7 +607,7 @@ QUnit.test( "App ranking", function( assert ) {
|
|||||||
date4,
|
date4,
|
||||||
time4,
|
time4,
|
||||||
(type, rankingRecordManager) => {
|
(type, rankingRecordManager) => {
|
||||||
assert.equal(rankingRecordManager.getCount(), 0, "no data");
|
assert.equal(rankingRecordManager.getCount(), 1, "month - rank");
|
||||||
// assert.equal(rankingRecordManager.getRankAt(0), 1, "day - rank #3");
|
// assert.equal(rankingRecordManager.getRankAt(0), 1, "day - rank #3");
|
||||||
// assert.equal(rankingRecordManager.getBestRecordAt(0), 99.18, "day - best record");
|
// assert.equal(rankingRecordManager.getBestRecordAt(0), 99.18, "day - best record");
|
||||||
// assert.equal(rankingRecordManager.getPlayerIDAt(0), 46, "day - player ID");
|
// assert.equal(rankingRecordManager.getPlayerIDAt(0), 46, "day - player ID");
|
||||||
|
|||||||
Reference in New Issue
Block a user