Example #1
0
    void Start()
    {
        BoardInserter boardInserter = new BoardInserter(this.transform);

        boardInserter.Insert(this.outerWallPrefabs, this.GetOuterWallPositions());
        boardInserter.Insert(this.floorPrefabs, this.GetFloorPositions());

        boardInserter.Insert(this.exitPrefab, new Vector3(this.cols - 1, this.rows - 1));

        VacanciesInserter vacancies = new VacanciesInserter(boardInserter, this.GetOccupiablePositions());

        vacancies.Insert(this.innerWallPrefabs, this.wallRange);
        vacancies.Insert(this.foodPrefabs, this.foodRange);
        vacancies.Insert(this.enemyPrefabs, this.enemyRange);
    }
Example #2
0
 public VacanciesInserter(BoardInserter boardInserter, IList <Vector3> vacancies)
 {
     this.boardInserter = boardInserter;
     this.vacancies     = vacancies;
 }
Example #3
0
 public VacanciesInserter(BoardInserter boardInserter, IEnumerable <Vector3> vacancies) : this(boardInserter, new List <Vector3>(vacancies))
 {
     // Already initialized
 }