Ejemplo n.º 1
0
        IEnumerator RunProgressive()
        {
            _generator.Reset(Seed);
            if (PatternGenerator.BoundaryPattern is Pattern <GameObjectTile> boundPattern)
            {
                _generator.SetBoundaryPattern(boundPattern);
            }

            foreach (var pos in _generator.RunProgressive())
            {
                var tile = _generator.ChunkStates[pos.x, pos.y, pos.z].Pattern.Chunk;

                _tilemap.SetTile(pos + Bounds.min, tile);

                yield return(null);
            }
        }
Ejemplo n.º 2
0
        IEnumerator GenerateProgressive()
        {
            _generator.Reset(Seed);


            yield return(null);

            foreach (var collapsedChunk in _generator.RunProgressive())
            {
                var pos  = Bounds.min + collapsedChunk;
                var tile = _generator.ChunkStates[collapsedChunk.x, collapsedChunk.y, collapsedChunk.z].Pattern.Chunk;
                _tilemap.SetTile(pos, tile);

                if (ShowSuperposition)
                {
                    DrawSuperposition();
                }

                yield return(null);
            }
        }