public void AddFrames(Rectangle rectangle) { SourceRectangle frameMove = new SourceRectangle { Source = rectangle }; frames.Add(frameMove); current = frames[0]; }
public virtual void Animate(GameTime game) { time += current.Source.Width * game.ElapsedGameTime.Milliseconds / 100; if (time >= current.Source.Width) { numnerframe++; if (numnerframe >= frames.Count) { numnerframe = 0; } current = frames[numnerframe]; time = 0; } }