예제 #1
0
파일: MapFinder.cs 프로젝트: zwong91/Titan
    public bool Create(GameLogic.game_LoadSceneInfo info)
    {
        m_Offset = new UnityEngine.Vector3(info.fOffx, info.fOffy, info.fOffz);

        int[] grid = new int[2];
        grid[0] = info.nXAxisLen / MapFinderManager.DEFAULT_GRID_SIZE + 1;
        grid[1] = info.nZAxisLen / MapFinderManager.DEFAULT_GRID_SIZE + 1;

        m_gridTree = new GridTree();
        m_gridTree.create(UnityEngine.Vector3.zero, grid, MapFinderManager.DEFAULT_GRID_SIZE);

        return(true);
    }
예제 #2
0
 // 创建
 public static bool Create(GameLogic.game_LoadSceneInfo info)
 {
     // TODO 临时用来处理
     //if(info.nMapID != 5)
     //{
     //    return false;
     //}
     if (m_finder != null)
     {
         Release();
     }
     m_finder = new MapFinder();
     return(m_finder.Create(info));
 }