debugging
This commit is contained in:
@@ -93,11 +93,19 @@ public partial class Map : TileMapLayer
|
||||
{
|
||||
_addressOccupants[ENEMY._address] = null;
|
||||
SetCellSolid(ENEMY._address);
|
||||
if (ENEMY._address == Vector2I.Zero)
|
||||
{
|
||||
GD.Print(4,_astar.IsPointSolid(ENEMY._address));
|
||||
}
|
||||
|
||||
ENEMY._address = ADDRESS;
|
||||
|
||||
_addressOccupants[ADDRESS] = ENEMY;
|
||||
SetCellSolid(ADDRESS);
|
||||
if (ADDRESS == Vector2I.Zero)
|
||||
{
|
||||
GD.Print(5,_astar.IsPointSolid(ADDRESS));
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCellSolid(Vector2I ADDRESS)
|
||||
@@ -120,24 +128,9 @@ public partial class Map : TileMapLayer
|
||||
public List<Vector2I> GetPath(Vector2I FROM, Vector2I TO, bool INCLUDE_FROM = false)
|
||||
{
|
||||
_astar.SetPointSolid(FROM, false);
|
||||
if (FROM == Vector2I.Zero)
|
||||
{
|
||||
// GD.Print(4,_astar.IsPointSolid(FROM));
|
||||
}
|
||||
if (TO == Vector2I.Zero)
|
||||
{
|
||||
// GD.Print(5,_astar.IsPointSolid(FROM));
|
||||
}
|
||||
|
||||
List<Vector2I> pathTaken = [.. _astar.GetIdPath(FROM, TO, true)];
|
||||
_astar.SetPointSolid(FROM, true);
|
||||
if (FROM == Vector2I.Zero)
|
||||
{
|
||||
// GD.Print(6,_astar.IsPointSolid(FROM));
|
||||
}
|
||||
if (TO == Vector2I.Zero)
|
||||
{
|
||||
// GD.Print(7,_astar.IsPointSolid(FROM));
|
||||
}
|
||||
|
||||
if (!INCLUDE_FROM)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user