Example #1
0
        public Chunk GetChunk(BlankChunk blankChunk)
        {
            var doorway   = blankChunk.OpenedDoorway;
            var findChunk = this.chunkPrefabs.FindAll(c => c.IsOpen(doorway));

            return(findChunk[Random.Range(0, findChunk.Count)]);
        }
        public Chunk CreateChunk(BlankChunk blankChunk, Point chunkIndex)
        {
            var chunk = Instantiate(this.chunkHolder.GetChunk(blankChunk));

            chunk.Initialize(this, chunkIndex, blankChunk);

            return(chunk);
        }