public override void Render(MapBatch batch, Point2D ScreenTopLeft) { if (this.PlayingSequence == -1) { batch.Draw(this.AnimationFrames.Sprites, ScreenTopLeft, this.AnimationFrames.GetSection(this.LastFrame)); } else { bool isDone = this.Sequences[this.PlayingSequence].Tick(out int frame); Log.Debug("Shifting to frame: " + frame.ToString()); this.LastFrame = frame; this.HasFinished = isDone; batch.Draw(this.AnimationFrames.Sprites, ScreenTopLeft, this.AnimationFrames.GetSection(frame)); if (this.HasFinished) { this.PlayingSequence = -1; } } }
public override void Render(MapBatch batch, Point2D ScreenTopLeft) { batch.Draw(AssetManager.Textures[this.TextureID], ScreenTopLeft, this.Priority); }