This commit is contained in:
Michele 2020-11-24 23:23:45 +00:00
parent 0b69b4b252
commit a085c364e5

View file

@ -1,4 +1,4 @@
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
@ -325,15 +325,16 @@ namespace Sledgemapper
{
return;
}
GraphicsDevice.Clear(Color.LightGray);
GraphicsDevice.Clear(Color.DarkGray);
var visibleTilesX = GraphicsDevice.Viewport.Width / _state.TileSize + 1;
var visibleTilesY = GraphicsDevice.Viewport.Height / _state.TileSize + 1;
_spriteBatch.Begin(transformMatrix: Matrix.CreateTranslation(_viewportCenter));
DrawGrid(visibleTilesX, visibleTilesY);
DrawTiles();
DrawGrid(visibleTilesX, visibleTilesY);
DrawWalls();
DrawOverlays();
@ -446,7 +447,7 @@ namespace Sledgemapper
posX1, posY1,
posX2,
posY2,
Color.GhostWhite);
Color.Black);
}
for (var i = -1; i < visibleTilesY + 2; i++)
@ -463,7 +464,7 @@ namespace Sledgemapper
_spriteBatch.DrawLine(posX1, posY1,
posX2,
posY2,
Color.GhostWhite);
Color.Black);
}