Пример #1
0
 public void Set(CubeChunk chunk)
 {
     chunk.Init();
     chunk.SetVisible(false);
     //chunk.GetComponent<Renderer>().enabled = false;
     chunkPool.Add(chunk);
 }
Пример #2
0
    IEnumerator ChunkUpdate()
    {
        while (true)
        {
            if (pendingChunk.Count > 0)
            {
                CubeChunk chunk = pendingChunk.Pop();
                if (chunk.NeedRefresh)
                {
                    chunk.RefreshSelf();
                    chunk.SetVisible(true);
                    //chunk.GetComponent<Renderer>().enabled = true;
                }
                else
                {
                    continue;
                }
            }

            yield return(null);
        }
    }