Add: animal sprite sheet
This commit is contained in:
@@ -4,14 +4,15 @@ function AnimalList(y) {
|
||||
|
||||
var animalCount = Animal.SPECIES_DATA.length;
|
||||
var lineWidth = GAME_SCREEN_SIZE.x - AnimalList.MARGIN_X * 2;
|
||||
console.log("lineWidth : " + lineWidth);
|
||||
// console.log("lineWidth : " + lineWidth);
|
||||
var offsetAnimal = lineWidth / (animalCount - 1);
|
||||
console.log("animalCount : " + animalCount);
|
||||
console.log("offsetAnimal : " + offsetAnimal);
|
||||
// console.log("animalCount : " + animalCount);
|
||||
// console.log("offsetAnimal : " + offsetAnimal);
|
||||
|
||||
for(var i = 0; i < animalCount; i++) {
|
||||
this.animals[i] = new Animal(
|
||||
Animal.TYPE_ICON,
|
||||
i,
|
||||
AnimalList.MARGIN_X + offsetAnimal * i,
|
||||
y
|
||||
);
|
||||
@@ -19,7 +20,9 @@ function AnimalList(y) {
|
||||
}
|
||||
|
||||
this.activeAnimalIndex = 0;
|
||||
// this.activate(this.activeAnimalIndex);
|
||||
this.activate(this.activeAnimalIndex);
|
||||
this.tweenAnimation(Animal.ANIMATION_TYPE_DAMAGE);
|
||||
}
|
||||
|
||||
AnimalList.prototype.activate = function(index) {
|
||||
@@ -55,5 +58,5 @@ AnimalList.prototype.tweenAnimation = function(animationType) {
|
||||
}
|
||||
|
||||
|
||||
AnimalList.MARGIN_X = 160;
|
||||
AnimalList.MARGIN_X = 100;
|
||||
AnimalList.ALPHA_INACTIVE = 0.1;
|
||||
Reference in New Issue
Block a user