void GenerateInit(List <MuseumCell> activeCells) { MuseumCell cell = CreateCell(RandomCoordinate); cell.Initialize(CreateMuseumRoom()); activeCells.Add(cell); }
private void CreatePassage(MuseumCell cell, MuseumCell otherCell, CellDirection direction) { MuseumPassage prefab = Random.value < entryProbability ? entryPrefab : passagePrefab; MuseumPassage passage = Instantiate(prefab) as MuseumPassage; passage.Initialize(cell, otherCell, direction); passage = Instantiate(prefab) as MuseumPassage; if (passage is MuseumEntry) { otherCell.Initialize(CreateMuseumRoom()); } else { otherCell.Initialize(cell.room); } passage.Initialize(otherCell, cell, direction.GetOpposite()); }