コード例 #1
0
ファイル: AStarMatrix.cs プロジェクト: svejdo1/astar
        public AStarNode this[PointInt32 point]
        {
            get {
            int index = point.Y * m_Width + point.X;
            AStarNode result;
            if (!m_Nodes.TryGetValue(index, out result)) {
              result = new AStarNode(point);
              m_Nodes[index] = result;
            }

            return result;
              }
              set {
            int index = point.Y * m_Width + point.X;
            m_Nodes[index] = value;
              }
        }
コード例 #2
0
ファイル: AStarNode.cs プロジェクト: svejdo1/astar
 public int SetParent(AStarNode parent)
 {
     this.Depth = parent.Depth + 1;
       this.Parent = parent;
       return this.Depth;
 }
コード例 #3
0
ファイル: AStarNode.cs プロジェクト: svejdo1/astar
 public int SetParent(AStarNode parent)
 {
     this.Depth  = parent.Depth + 1;
     this.Parent = parent;
     return(this.Depth);
 }