Add: login home button, menu welcome message
* Add: home button in login * Fix: animal typingCount * Add: Welcome player text in login
This commit is contained in:
+24
-22
@@ -9,20 +9,22 @@ class Animal {
|
||||
}
|
||||
|
||||
animalLevelIDByRecord(record) {
|
||||
if(sessionStorageManager.playingAppID <= 20) { // practice
|
||||
for(let i = 0; i < Animal.SPECIES_DATA.length - 1; i++) {
|
||||
if(record < Animal.SPECIES_DATA[i].practiceTypingCount)
|
||||
return i;
|
||||
}
|
||||
} else { // test
|
||||
for(let i = 0; i < Animal.SPECIES_DATA.length - 1; i++) {
|
||||
if(record < Animal.SPECIES_DATA[i].testTypingCount)
|
||||
return i;
|
||||
}
|
||||
|
||||
console.log(record);
|
||||
for(let i = Animal.SPECIES_DATA.length - 1; i > 0; i--) {
|
||||
console.log(i);
|
||||
console.log(this.typingCount(Animal.SPECIES_DATA[i]));
|
||||
if(record >= this.typingCount(Animal.SPECIES_DATA[i]))
|
||||
return i;
|
||||
}
|
||||
|
||||
return Animal.SPECIES_DATA.length - 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
typingCount(speciesData) {
|
||||
if(sessionStorageManager.playingAppID <= 20)
|
||||
return speciesData.practiceTypingCount;
|
||||
else
|
||||
return speciesData.testTypingCount;
|
||||
}
|
||||
|
||||
loadSpriteNames() {
|
||||
@@ -112,16 +114,16 @@ Animal.ANIMATION_TYPE_DAMAGE = 1;
|
||||
|
||||
|
||||
Animal.SPECIES_DATA = [
|
||||
{ "species" : "snail", "runningFPS" : 1.1, "practiceTypingCount" : 5, "testTypingCount" : 10 },
|
||||
{ "species" : "turtle", "runningFPS" : 5.5, "practiceTypingCount" : 10, "testTypingCount" : 20 },
|
||||
{ "species" : "cat", "runningFPS" : 10.1, "practiceTypingCount" : 20, "testTypingCount" : 30 },
|
||||
{ "species" : "lion", "runningFPS" : 15.5, "practiceTypingCount" : 30, "testTypingCount" : 50 },
|
||||
{ "species" : "rabbit", "runningFPS" : 20.2, "practiceTypingCount" : 40, "testTypingCount" : 100 },
|
||||
{ "species" : "ostrich", "runningFPS" : 25.5, "practiceTypingCount" : 50, "testTypingCount" : 200 },
|
||||
{ "species" : "horse", "runningFPS" : 30.3, "practiceTypingCount" : 60, "testTypingCount" : 300 },
|
||||
{ "species" : "dog", "runningFPS" : 35.5, "practiceTypingCount" : 70, "testTypingCount" : 400 },
|
||||
{ "species" : "cheetah", "runningFPS" : 40.4, "practiceTypingCount" : 80, "testTypingCount" : 500 },
|
||||
{ "species" : "eagle", "runningFPS" : 45.5, "practiceTypingCount" : 1000, "testTypingCount" : 1000 }
|
||||
{ "species" : "snail", "runningFPS" : 1.1, "practiceTypingCount" : 0, "testTypingCount" : 0 },
|
||||
{ "species" : "turtle", "runningFPS" : 5.5, "practiceTypingCount" : 5, "testTypingCount" : 20 },
|
||||
{ "species" : "cat", "runningFPS" : 10.1, "practiceTypingCount" : 10, "testTypingCount" : 50 },
|
||||
{ "species" : "lion", "runningFPS" : 15.5, "practiceTypingCount" : 15, "testTypingCount" : 100 },
|
||||
{ "species" : "rabbit", "runningFPS" : 20.2, "practiceTypingCount" : 20, "testTypingCount" : 200 },
|
||||
{ "species" : "ostrich", "runningFPS" : 25.5, "practiceTypingCount" : 30, "testTypingCount" : 300 },
|
||||
{ "species" : "horse", "runningFPS" : 30.3, "practiceTypingCount" : 40, "testTypingCount" : 400 },
|
||||
{ "species" : "dog", "runningFPS" : 35.5, "practiceTypingCount" : 50, "testTypingCount" : 500 },
|
||||
{ "species" : "cheetah", "runningFPS" : 40.4, "practiceTypingCount" : 60, "testTypingCount" : 600 },
|
||||
{ "species" : "eagle", "runningFPS" : 45.5, "practiceTypingCount" : 80, "testTypingCount" : 700 }
|
||||
];
|
||||
|
||||
Animal.SPRITE_NAMES = {
|
||||
|
||||
Reference in New Issue
Block a user