Пример #1
0
        protected void changeAnimation(Animation newAnimation)
        {
            if (currentAnimation != null)
                currentAnimation.stop();

            newAnimation.stop();

            currentAnimation = newAnimation;

            currentAnimation.play();
        }
Пример #2
0
 public override void loadContent()
 {
     moveAnimation = new Animation((Actor)this, AnimationType.Dash,
         SpriteManager.getTexture(Game1.FISH_SWIM), 4, true, 0.1f);
     deathAnimation = new Animation((Actor)this, AnimationType.Death,
         SpriteManager.getTexture(Game1.FISH_DEATH), 8, false, 0.1f);
 }