예제 #1
0
        public Chunk CreateChunk(BlankChunk blankChunk, Point chunkIndex)
        {
            var chunk = Instantiate(this.chunkHolder.GetChunk(blankChunk));
            chunk.Initialize(this, chunkIndex, blankChunk);

            return chunk;
        }
예제 #2
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)];
        }