public void Render(MapBatch batch, Point2D ScreenTopLeft)
 {
     foreach (AbstractVisual item in this.RenderQueue.Visuals)
     {
         item.Render(batch, ScreenTopLeft);
     }
 }
Exemplo n.º 2
0
        public void Render(MapBatch batch, Point2D ScreenTopLeft)
        {
            int length = this.RenderQueue.Count;

            for (int i = 0; i < length; i++)
            {
                AbstractVisual item = this.RenderQueue[i];
                item.Render(batch, ScreenTopLeft);
            }
        }
        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;
                }
            }
        }
Exemplo n.º 4
0
 public override void Render(MapBatch batch, Point2D ScreenTopLeft)
 {
     batch.Draw(AssetManager.Textures[this.TextureID], ScreenTopLeft, this.Priority);
 }
Exemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="batch"></param>
 /// <param name="bounds">The bounds to render the texture at.</param>
 public abstract void Render(MapBatch batch, Point2D ScreenTopLeft);
Exemplo n.º 6
0
 public override void Render(MapBatch batch, Point2D ScreenTopLeft)
 {
     this.Texture.Render(batch, new Point2D(ScreenTopLeft.X + this.XOffset, ScreenTopLeft.Y + this.YOffset));
 }