//-------------------------------------------------- // Motion Framework // Copyright©2019-2020 何冠峰 // Licensed under the MIT license //-------------------------------------------------- namespace MotionFramework.AI { public abstract class AStarNode { /// /// 是否为阻挡节点 /// public abstract bool IsBlock(); /// /// 总的代价值 /// internal float Cost { get { return G + H; } } /// /// 路径搜索的时候,临时设立的G值 /// 从起点移动到该节点的代价 /// internal float G { set; get; } /// /// 路径搜索的时候,临时设立的H值 /// 从该节点移动到终点的代价 /// internal float H { set; get; } /// /// 路径搜索的时候,临时设立的父类节点 /// internal AStarNode Parent { set; get; } /// /// 清空临时数据 /// public void ClearTemper() { G = 0; H = 0; Parent = null; } } }