Example #1
0
    private IEnumerator AddCell(int i, bool lastCell)
    {
        var cell = Instantiate(RandomCellPrefab());

        dungeonPath.dungeonCells[i] = cell;

        cell.gameObject.name = "Cell " + i;
        DungeonCell.CellType t = lastCell ? DungeonCell.CellType.endCell : DungeonCell.CellType.standard;
        cell.Populate(testBluePrint.floors[0], t);
        yield return(cell.Connect(dungeonPath.dungeonCells[i - 1]));
    }
Example #2
0
    internal DungeonCellContent GetCellContent(DungeonCell.CellType type)
    {
        var c = new DungeonCellContent()
        {
            monsterBlueprints = new List <MonsterBlueprint>()
        };

        if (type == DungeonCell.CellType.standard)
        {
            c.monsterBlueprints = monsterConfigs[UnityEngine.Random.Range(0, monsterConfigs.Length)].GetMonsters();
        }
        return(c);
    }