private void PerformFirstGenerationStep(List <BaseCell> activeCells) { BaseCell newCell = CreateCell(RandomCoordinates); newCell.Initialize(CreateRoom(-1)); activeCells.Add(newCell); }
private void CreatePassage(BaseCell cell, BaseCell otherCell, CompassDirection direction) { CellPassage prefab = Random.value < ip.doorProbability ? ip.doorPrefab : ip.passagePrefab; CellPassage passage = Instantiate(prefab) as CellPassage; passage.Initialize(cell, otherCell, direction); passage = Instantiate(prefab) as CellPassage; if (passage is Door) { otherCell.Initialize(CreateRoom(-1 /*cell.room.settingsIndex*/)); } else { otherCell.Initialize(cell.room); } passage.Initialize(otherCell, cell, direction.GetOpposite()); }