示例#1
0
    // Instantiates a room at the given location
    private void Spawn(LevelSpace levelSpace, float xPos, float yPos)
    {
        UnityEngine.Vector2 offset   = gridSizeWorldUnits / 2.0f;
        UnityEngine.Vector2 spawnPos = new UnityEngine.Vector2(xPos, yPos) * worldUnitsPerOneGridCell - offset;
        levelSpace.spawnPos = spawnPos;
        LabRoomGenerator roomToSpawn = Instantiate(labRoomGenPrefab, spawnPos, Quaternion.identity, roomList);

        roomToSpawn.init(levelSpace);
    }
示例#2
0
 private bool IsBoundaryRoom(LevelSpace levelSpace)
 {
     return(levelSpace.room.type == Room.RoomTypes.border);
 }