コード例 #1
0
ファイル: BitGridTest.cs プロジェクト: zh880517/UnityLib
 public void TestPath()
 {
     if (Grid.Get(StartPos) && Grid.Get(EndPos))
     {
         Finder.FindPath(StartPos, EndPos);
         SmoothPoints.Clear();
         Finder.FloydPath(SmoothPoints);
         Debug.LogFormat("直线联通 {0}", Finder.CheckWalkAble(StartPos, EndPos));
         if (SmoothPoints.Count < 0)
         {
             Debug.LogError("路径平滑计算错误");
         }
     }
 }