Add: animal icon for typing app button
This commit is contained in:
@@ -47,14 +47,14 @@ class Animal {
|
||||
tweenAnimation(animationType) {
|
||||
switch(animationType) {
|
||||
case Animal.ANIMATION_TYPE_CHANGE:
|
||||
this.sprite.width = 70;
|
||||
this.sprite.height = 70;
|
||||
game.add.tween(this.sprite).to( { width: 50, height: 50 }, 500, Phaser.Easing.Bounce.Out, true);
|
||||
this.sprite.width = 200;
|
||||
this.sprite.height = 200;
|
||||
game.add.tween(this.sprite).to( { width: 150, height: 150 }, 500, Phaser.Easing.Bounce.Out, true);
|
||||
break;
|
||||
|
||||
case Animal.ANIMATION_TYPE_DAMAGE:
|
||||
this.sprite.width = 100;
|
||||
game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Bounce.In, true);
|
||||
this.sprite.width = 200;
|
||||
game.add.tween(this.sprite).to( { width: 150 }, 500, Phaser.Easing.Bounce.In, true);
|
||||
// game.add.tween(this.sprite).to( { width: 50 }, 500, Phaser.Easing.Elastic.Out, true);
|
||||
break;
|
||||
|
||||
@@ -71,8 +71,8 @@ class Animal {
|
||||
if(this.sprite === null) {
|
||||
this.sprite = game.add.sprite(this.posX, this.posY, this.spriteFrameNames.run1);
|
||||
this.sprite.anchor.set(0.5);
|
||||
this.sprite.width = 50;
|
||||
this.sprite.height = 50;
|
||||
this.sprite.width = 150;
|
||||
this.sprite.height = 150;
|
||||
}
|
||||
|
||||
this.stopAnimation();
|
||||
@@ -103,6 +103,8 @@ class Animal {
|
||||
|
||||
|
||||
static loadResources() {
|
||||
game.load.image('snail_shadow', '../../../resources/image/character/animal/snail/shadow.png');
|
||||
|
||||
game.load.image('snail_icon', '../../../resources/image/character/animal/snail/run2.png');
|
||||
game.load.image('snail_run1', '../../../resources/image/character/animal/snail/run1.png');
|
||||
game.load.image('snail_run2', '../../../resources/image/character/animal/snail/run2.png');
|
||||
|
||||
Reference in New Issue
Block a user