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:
+20
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user