private void CreateWall(MazeCell cell, MazeCell otherCell, MazeDirection direction) { MazeCellWall wall = Instantiate(this.WallPrefab) as MazeCellWall; wall.Initialize(cell, otherCell, direction); if (otherCell != null) { wall = Instantiate(this.WallPrefab) as MazeCellWall; wall.Initialize(otherCell, cell, direction.GetOpposite()); } }
public void CreateAndPlaceWall(MazeCell cell, MazeCell otherCell, MazeDirection direction) { MazeCellWall wall = Instantiate(wallPrefab) as MazeCellWall; wall.Initialize(cell, otherCell, direction); wall.transform.GetChild(0).localScale = new Vector3(1, 1, sizeCells); wall.transform.GetChild(0).localPosition = new Vector3(sizeCells * 0.5f - 0.16666f, 0, 0); }
private void CreateWall(MazeCell cell, MazeCell otherCell, MazeDirection direction) { MazeCellWall wall = Instantiate(this.WallPrefab) as MazeCellWall; wall.Initialize(cell, otherCell, direction); }