Exemplo n.º 1
0
 public void Release()
 {
     _dataLen = 0;
     if (m_mapTrees != null)
     {
         m_mapTrees.Clear();
     }
     if (m_listTrees != null)
     {
         TreeInfo.FreeTIs(m_listTrees);
         m_listTrees.Clear();
     }
     if (LSubTerrainMgr.Instance != null)
     {
         for (int i = 0; i < LSubTerrainMgr.Instance.Layers.Count; ++i)
         {
             LSubTerrainMgr.Instance.LayerCreators[i].DelTreeBatch(Index);
         }
         for (int i = X * 8; i < X * 8 + 8; i++)
         {
             for (int j = Z * 8; j < Z * 8 + 8; j++)
             {
                 int tmpKey = LSubTerrUtils.Tree32PosTo32Key(i, j);
                 LSubTerrainMgr.Instance.m_map32Trees.Remove(tmpKey);
             }
         }
     }
 }