2020-06-18 23:52:18 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace OpenSim.Modules.PathFinding
|
|
|
|
|
{
|
|
|
|
|
class PathNode
|
|
|
|
|
{
|
|
|
|
|
public int PositionX = 0;
|
|
|
|
|
public int PositionY = 0;
|
|
|
|
|
|
|
|
|
|
public bool Walkable = false;
|
|
|
|
|
public bool Target = false;
|
2020-06-22 22:51:24 +00:00
|
|
|
|
public bool Start = false;
|
2020-06-18 23:52:18 +00:00
|
|
|
|
|
2020-06-22 22:51:24 +00:00
|
|
|
|
public int f_cost = 99999;
|
2020-06-18 23:52:18 +00:00
|
|
|
|
|
|
|
|
|
public PathNode Parent = null;
|
|
|
|
|
|
|
|
|
|
public PathNode(int positionX, int positionY)
|
|
|
|
|
{
|
|
|
|
|
PositionX = positionX;
|
|
|
|
|
PositionY = positionY;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public PathNode(int positionX, int positionY, bool isWalkable)
|
|
|
|
|
{
|
|
|
|
|
PositionX = positionX;
|
|
|
|
|
PositionY = positionY;
|
|
|
|
|
|
|
|
|
|
Walkable = isWalkable;
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-22 22:51:24 +00:00
|
|
|
|
public PathNode(int positionX, int positionY, bool isWalkable, bool isTarget, bool isStart)
|
2020-06-18 23:52:18 +00:00
|
|
|
|
{
|
|
|
|
|
PositionX = positionX;
|
|
|
|
|
PositionY = positionY;
|
|
|
|
|
|
|
|
|
|
Walkable = isWalkable;
|
|
|
|
|
Target = isTarget;
|
2020-06-22 22:51:24 +00:00
|
|
|
|
Start = isStart;
|
2020-06-18 23:52:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|