Fix: apply animal sheet to game, menu
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user