public static void AddDressing(Room room, DesignedBuilding layout) { if (room is LivingQuarters) { ActiveCastleLivingQuartersGen.AddDressing((LivingQuarters)room, layout.grid); } if (room is CommonSpace) { ActiveCastleCommonSpaceGen.AddDressing((CommonSpace)room, layout.grid); } if (room is LivingQuarters || room is CommonSpace || room is BossRoom) { AddRoomLight(room); } AddTorches(room, layout.grid); room.dressingLocations.Clear(); }
public static void InstantiateMonsters(int floor, DesignedBuilding layout, SocialStructure socialStructure, LevelGen levelGen) { //if (!NetworkServer.active) return; foreach (var monster in socialStructure.population) { int roll = Random.Range(0, monster.associatedRooms.Count); var room = monster.associatedRooms[roll]; if (room.floor != floor) { continue; } float xRoll = Random.Range(5f * room.x, 5f * (room.x + room.xSize - 1)); float yRoll = Random.Range(5f * room.y, 5f * (room.y + room.ySize - 1)); if (monster.quality == 4) { xRoll = (room.x + (room.xSize / 2)) * 4; yRoll = (room.y + (room.ySize / 2)) * 4; } InstantiateMonster(monster, xRoll, yRoll, levelGen); } }
public DesignedBuildingLayout(DesignedBuilding building) { this.building = building; }
public static void InstantiateLayout(DesignedBuilding layout, int floor, int seed) { Random.InitState(seed); ActiveCastleGen.InstantiateLayout(layout, floor); }
public static void AddDressing(Room room, DesignedBuilding layout) { ActiveCastleGen.AddDressing(room, layout); }
public static void InstantiateMonsters(int floor, DesignedBuilding layout, SocialStructure socialStructure, LevelGen levelGen) { ActiveCastleGen.InstantiateMonsters(floor, layout, socialStructure, levelGen); }