C#AStar问题,不会正确做到

Bas*_*sic 0 c# xna a-star path-finding

我目前正在进行A*寻路,但我遇到了一些问题.在走最好的路径之前,它走错路.我究竟做错了什么?

源代码:http://basic.apayostudios.com/AStar.zip

线上:

Game.cs http://pastie.org/1656955

Node.cs http://pastie.org/1656956

枚举:

public enum NodeType
{
    None,
    Solid,
    Start,
    End
}
Run Code Online (Sandbox Code Playgroud)

谢谢!

Tho*_*que 7

看看Eric Lippert撰写的这个博客系列:

在C#3.0中使用A*查找路径