void InitHeightMap() { if (heightMapCache == null) { heightMapCache = new HeightMapCache(); } else { heightMapCache.Clear(); } }
void InitHeightMap() { if (heightMapCache == null) { int poolSize = (visibleChunksDistance + 10) * 2 * CHUNK_SIZE / 128 + 1; poolSize *= poolSize; heightMapCache = new HeightMapCache(poolSize); } else { heightMapCache.Clear(); } }