예제 #1
0
 public static void RemoveChunk(int chunkX, int chunkZ)
 {
     key.Set(chunkX, chunkZ);
     if (chunkDict.ContainsKey(key))
     {
         NBTChunk chunk = chunkDict[key];
         ChunkRefresher.Remove(chunk);
         chunk.ClearData();
         ChunkPool.Recover(chunk);
         chunkDict.Remove(key);
     }
 }
예제 #2
0
    public static void UnloadChunk(int x, int z)
    {
        //Debug.Log("UnloadChunk,x=" + x + ",z=" + z);
        Chunk chunk = GetChunk(x, z);

        if (chunk != null)
        {
            ChunkRefresher.Remove(chunk);
            chunk.ClearData();
            RemoveFromChunkDict(chunk);
            ChunkPool.Recover(chunk);
        }
    }