Beispiel #1
0
        public void Generate()
        {
            Stopwatch sw = new Stopwatch();

            sw.Start();

            GetHeightData();
            GetGroundVoxels();
            GetGridModels();

            sw.Stop();
            Debug.LogInfo("Generated in " + sw.ElapsedMilliseconds);
        }
Beispiel #2
0
        public void QueueGeneratedChunks()
        {
            Chunk chunk;

            if (generatedButNotQueued.Count > 0)
            {
                Vector3Int posInChunkSpace = generatedButNotQueued[0];

                if (chunks.TryGetValue(posInChunkSpace, out chunk))
                {
                    chunk.Render();
                }
                else
                {
                    Debug.LogError("Cound not generate Chunk " + posInChunkSpace.ToString());
                }

                generatedButNotQueued.Remove(posInChunkSpace);
            }
        }