mostly fixed movement but there's still a problem with enemies in the top left cell (0,0) being set to not solid

This commit is contained in:
2026-06-09 18:11:06 -04:00
parent e209861cb3
commit 4722cf882b
7 changed files with 114 additions and 40 deletions
+20
View File
@@ -30,4 +30,24 @@ public partial class PlayArea : Node2D
_bucket.Move();
}
public void HighlightCells()
{
TileMapLayer occupiedSpaces = GetNode<TileMapLayer>("OccupiedSpaces");
_map._cells.ForEach(c =>
{
if (_map.HasOccupant(c))
{
occupiedSpaces.SetCell(c, 0, new Vector2I(4,0));
}
else if (_map._astar.IsPointSolid(c))
{
}
else
{
occupiedSpaces.SetCell(c, 0, Vector2I.Down*4);
}
});
}
}