private Floor CreateFloor(int floorNo) { Floor newFloor = Instantiate(floorPrefab, transform.position, Quaternion.identity, officeParent).GetComponent <Floor>(); floors.Add(newFloor); Floor.FloorTypes newType = Floor.FloorTypes.Office; if (floorNo < warehouseCount) { newType = Floor.FloorTypes.Warehouse; } newFloor.InitialiseFloor(floorSize.x, floorHeight, floorSize.y, floorNo, newType, workspaceCount, workspacePadding); newFloor.transform.position = new Vector3(0, newFloor.transform.position.y, 0); if (floorNo < floorCount - 1) { newFloor.AddStairs(); } if (floorNo == 0) { AddEntrance(); } return(newFloor); }