Add: WhacAMole typing game

This commit is contained in:
2018-10-04 16:45:47 +09:00
parent 740115ee53
commit 72c8b9e1f4
28 changed files with 1136 additions and 112 deletions
+50 -8
View File
@@ -51,6 +51,7 @@ function goLogin() {
location.href = "login.html";
}
/*
function isTypingGame() {
if(sessionStorageManager.getPlayingAppName() === null)
return false;
@@ -60,8 +61,31 @@ function isTypingGame() {
return true;
}
*/
function isTypingPracticeStage() {
function isTypingGameApp() {
if(sessionStorageManager.getPlayingAppName() == null)
return false;
if(sessionStorageManager.getPlayingAppID < 50 || sessionStorageManager.getPlayingAppID > 100)
return false;
return true;
}
function isMouseGameApp() {
if(sessionStorageManager.getPlayingAppName() == null)
return false;
if(sessionStorageManager.getPlayingAppID > 100)
return true;
return false;
}
function isTypingPracticeApp() {
let appName = sessionStorageManager.getPlayingAppName();
if(appName.indexOf("practice_") > -1)
@@ -70,7 +94,7 @@ function isTypingPracticeStage() {
return false;
}
function isTypingTestStage() {
function isTypingTestApp() {
let appName = sessionStorageManager.getPlayingAppName();
if(appName.indexOf("test_") > -1)
@@ -79,39 +103,39 @@ function isTypingTestStage() {
return false;
}
function isEnglishTypingStage() {
function isEnglishTypingApp() {
if(sessionStorageManager.getPlayingAppName().indexOf("english") > -1)
return true;
return false;
}
function isKoreanTypingStage() {
function isKoreanTypingApp() {
if(sessionStorageManager.getPlayingAppName().indexOf("korean") > -1)
return true;
return false;
}
function isTypingWordStage() {
function isTypingWordApp() {
let appName = sessionStorageManager.getPlayingAppName();
if(appName.indexOf("_word") > -1)
return true;
// if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_word") > -1)
// if((isTypingPracticeApp() || isTypingTestApp()) && appName.indexOf("_word") > -1)
// return true;
return false;
}
function isTypingSentenceStage() {
function isTypingSentenceApp() {
let appName = sessionStorageManager.getPlayingAppName();
if(appName.indexOf("_sentence") > -1)
return true;
// if((isTypingPracticeStage() || isTypingTestStage()) && appName.indexOf("_sentence") > -1)
// if((isTypingPracticeApp() || isTypingTestApp()) && appName.indexOf("_sentence") > -1)
// return true;
return false;
@@ -132,4 +156,22 @@ function isExperienceMaestroAccount() {
}
function getGameAppName() {
var appName = sessionStorageManager.getPlayingAppName();
if(isTypingPracticeApp())
return "typing_practice";
else if(isTypingTestApp())
return "typing_test.html";
else if(isTypingGameApp()) {
if(isKoreanTypingApp())
return appName.substring("typing_korean_".length);
else if(isEnglishTypingApp())
return appName.substring("typing_english_".length);
}
return appName;
}
let textStyleBasic = { font: "bold 32px Arial", fill: "#fff", align: "center", boundsAlignH: "center", boundsAlignV: "middle" };