Merge branch 'develop' of https://git.michelescandura.com/michele/Map into develop

This commit is contained in:
Michele Scandura 2020-11-25 11:42:36 +00:00
commit 39286ab94a
3 changed files with 93 additions and 10 deletions

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);
}