Commit Description:
Add contracts to toolbar.
Commit Description:
Add contracts to toolbar.
File last commit:
Show/Diff file:
Action:
isometric-park-fna/Renderers/AreaRenderer.cs
39 lines | 776 B | text/x-csharp | CSharpLexer
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using isometricparkfna.UI;
using isometricparkfna.Components;
using Encompass;
using SpriteFontPlus;
namespace isometricparkfna.Renderers
{
public class AreaRenderer : GeneralRenderer
{
private SpriteBatch batch;
private SpriteFont font;
public AreaRenderer(SpriteBatch batch, SpriteFont font)
{
this.batch = batch;
this.font = font;
}
public override void Render()
{
var budgetWindow = new BudgetWindow(new Budget { }, this.font, 0, 0);
foreach (ref readonly var entity in ReadEntities<AreaComponent>())
{
var areaComponent = GetComponent<AreaComponent>(entity);
Tile.DrawOutlinedSquares(batch, areaComponent.squares, Color.Teal);
}
}
}
}