예제 #1
0
        public Dungeon(DungeonConfig config, float tileSize, LayerMask obstacleMask)
        {
            this.config       = config;
            this.mTileSize    = tileSize;
            this.obstacleMask = obstacleMask;

            this.mDungeonContainer = new GameObject("Dungeon");
        }
예제 #2
0
        /// <summary>
        /// Genearte the dungeon
        /// </summary>
        public void CreateDungeon(DungeonConfig config, bool isSpawn)
        {
            var dungeon = new Dungeon(config, this.setting.tileSize, this.setting.obstacleMask);

            StartCoroutine(dungeon.Generate(this.setting.simulationCubePrefab, this.currentYAxis, isSpawn));

            if (isSpawn)
            {
                this.dungeon = dungeon;
            }
            else
            {
                this.nextDungeon = dungeon;
            }
            this.currentYAxis += 50;
        }