Fix: apply animal sheet to game, menu

This commit is contained in:
2018-11-13 11:38:20 +09:00
parent 99ca77d950
commit 11ac9924e6
10 changed files with 81 additions and 162 deletions
+12 -7
View File
@@ -123,14 +123,19 @@ var MenuTypingPractice = {
return 0;
},
getIconImage: function(jsonList, appID) {
getAnimalSprite: function(jsonList, appID) {
var appHighestRecord = this.getAppHighestRecord(jsonList, appID);
var animalSprite = null;
if(appHighestRecord === 0)
return "snail_shadow";
if(appHighestRecord === 0) {
animalSprite = new Animal(Animal.TYPE_ICON, 0, 0, 0);
// animalSprite.sprite.tint = RoundRectButtonSetting.DEFAULT_BUTTON_COLORS.disabled;
} else {
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_PRACTICE);
animalSprite = new Animal(Animal.TYPE_ICON, animalLevel, 0, 0);
}
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_PRACTICE);
return Animal.SPECIES_DATA[animalLevel].species + Animal.SPRITE_NAMES.icon;
return animalSprite;
},
downloadListSucceeded: function(replyJSON) {
@@ -152,7 +157,7 @@ var MenuTypingPractice = {
var typingPracticeButton = new TypingAppButton(
TypingAppButton.TYPE_PRACTICE_KOREAN,
posX, posY,
this.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID),
this.getAnimalSprite(replyJSON.KoreanHighScoreList, activeApp.AppID),
activeApp.KoreanName,
{
AppID: activeApp.AppID,
@@ -176,7 +181,7 @@ var MenuTypingPractice = {
var typingPracticeButton = new TypingAppButton(
TypingAppButton.TYPE_PRACTICE_ENGLISH,
posX, posY,
this.getIconImage(replyJSON.EnglishHighScoreList, activeApp.AppID),
this.getAnimalSprite(replyJSON.EnglishHighScoreList, activeApp.AppID),
activeApp.KoreanName,
{
AppID: activeApp.AppID,
+12 -7
View File
@@ -125,14 +125,19 @@ var MenuTypingTest = {
return 0;
},
getIconImage: function(jsonList, appID) {
getAnimalSprite: function(jsonList, appID) {
var appHighestRecord = this.getAppHighestRecord(jsonList, appID);
var animalSprite = null;
if(appHighestRecord === 0)
return "snail_shadow";
if(appHighestRecord === 0) {
animalSprite = new Animal(Animal.TYPE_ICON, 0, 0, 0);
// animalSprite.sprite.tint = RoundRectButtonSetting.DEFAULT_BUTTON_COLORS.disabled;
} else {
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_PRACTICE);
animalSprite = new Animal(Animal.TYPE_ICON, animalLevel, 0, 0);
}
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_TEST);
return Animal.SPECIES_DATA[animalLevel].species + Animal.SPRITE_NAMES.icon;
return animalSprite;
},
downloadListSucceeded: function(replyJSON) {
@@ -154,7 +159,7 @@ var MenuTypingTest = {
var typingTestButton = new TypingAppButton(
TypingAppButton.TYPE_TEST_KOREAN,
posX, posY,
this.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID),
this.getAnimalSprite(replyJSON.KoreanHighScoreList, activeApp.AppID),
activeApp.KoreanName,
{
AppID: activeApp.AppID,
@@ -178,7 +183,7 @@ var MenuTypingTest = {
var typingTestButton = new TypingAppButton(
TypingAppButton.TYPE_TEST_ENGLISH,
posX, posY,
this.getIconImage(replyJSON.EnglishHighScoreList, activeApp.AppID),
this.getAnimalSprite(replyJSON.EnglishHighScoreList, activeApp.AppID),
activeApp.KoreanName,
{
AppID: activeApp.AppID,