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)); }
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)); }
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); }
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); }
public void Draw(Batcher2D batcher) { SetUvs(); batcher.FillRect(Rect, _sprite); }