示例#1
0
文件: Actor.cs 项目: atarng/JAMMM
        protected void changeAnimation(Animation newAnimation)
        {
            if (currentAnimation != null)
                currentAnimation.stop();

            newAnimation.stop();

            currentAnimation = newAnimation;

            currentAnimation.play();
        }
示例#2
0
文件: Fish.cs 项目: atarng/JAMMM
 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);
 }