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
+2 -5
View File
@@ -9,6 +9,8 @@ function AnimalList(y) {
// console.log("animalCount : " + animalCount);
// console.log("offsetAnimal : " + offsetAnimal);
this.activeAnimalIndex = 0;
for(var i = 0; i < animalCount; i++) {
this.animals[i] = new Animal(
Animal.TYPE_ICON,
@@ -19,8 +21,6 @@ function AnimalList(y) {
this.inactivate(i);
}
this.activeAnimalIndex = 0;
// this.activate(this.activeAnimalIndex);
this.activate(this.activeAnimalIndex);
this.tweenAnimation(Animal.ANIMATION_TYPE_DAMAGE);
}
@@ -39,9 +39,6 @@ AnimalList.prototype.inactivate = function(index) {
this.animals[index].stopAnimation();
this.animals[index].setScale(1);
this.animals[index].setAlpha(AnimalList.ALPHA_INACTIVE);
var animalData = Animal.SPECIES_DATA[index];
this.animals[index].setIconSprite(animalData);
}
AnimalList.prototype.animate = function(index) {