Esempio n. 1
0
 public AnimationUpdater(Game1 game)
     : base(game)
 {
     slashAtkTexture = new AnimatedTexture(Vector2.Zero, 0, 0, 0);
     slashAtkTexture.Load(Game.Content, "slash attack ani", 7, 30);
     slashAtkTexture.Stop();
     // TODO: Construct any child components here
 }
Esempio n. 2
0
        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public bool UpdateAni(AnimatedTexture aniTx, float elapsed)
        {
            // TODO: Add your update code here
            aniTx.UpdateFrame(elapsed);

            if (aniTx.Frame / (aniTx.framecount - 1) == 1)
            {
                aniTx.Stop();
                return(false);
            }
            return(true);
            //base.Update(gameTime);
        }