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 }
/// <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); }