Example #1
0
        public void Draw(Batcher2D batcher)
        {
            var pos = ConvertUnits.ToDisplayUnits(Position);

            pos.Y -= .75f * Height;
            batcher.FillRect(new RectangleF(pos, new Vector2(Height)), Assets.GrassSheet.GetSprite(DecorationType));
        }
Example #2
0
        public void Draw(Batcher2D batcher)
        {
            var pos = ConvertUnits.ToDisplayUnits(Position);
            var w   = ConvertUnits.ToDisplayUnits(Width);
            var h   = ConvertUnits.ToDisplayUnits(Height);

            batcher.FillRect(new RectangleF(pos, new Vector2(w, h)), Assets.CloudsSheet.GetSprite(_type));
        }
Example #3
0
        public void Draw(Batcher2D batcher)
        {
            var pos    = ConvertUnits.ToDisplayUnits(Position);
            var d      = ConvertUnits.ToDisplayUnits(Size) * 1.5f;
            var sprite = Assets.ObstacleSheet.GetSprite(_type);

            batcher.FillRect(new RectangleF(pos - new Vector2(d / 2f, d / 2f - d / 10f), new Vector2(d)), sprite);
        }
Example #4
0
        public void Draw(Batcher2D batcher)
        {
            var rect       = new RectangleF(Position, Size);
            var borderRect = rect;

            borderRect = borderRect.Inflate(HalfBorderThickness, HalfBorderThickness);

            batcher.DrawRect(borderRect, BorderColor, BorderThickness);
            batcher.FillRect(rect, FillColor);
        }
Example #5
0
 public void Draw(Batcher2D batcher)
 {
     SetUvs();
     batcher.FillRect(Rect, _sprite);
 }