PresetRoomFULL version only
Class in ChivalrousGames.DungeonMaster / Inherits from: MonoBehaviour
Description
Manual configurations for a Room in a Level. PresetRooms count toward max occurrence and lower the weight of the Room with usage if configured so in RoomGenerationConfig.
Fields
level | Level | The Level in which this PresetRoom is located. |
room | Room | The Room this PresetRoom is based on. |
coordinate | Point | The coordinate of this PresetRoom in the Level. |
rotation | PointRotation | The rotation of this PresetRoom in the Level. |
Properties
PresetRoomConnectorPoints | List<PresetRoomConnectorPoint> | ReadOnly Gets the list of PresetRoomConnectors. |
PresetSpawnPoints | List<PresetSpawnPoint> | ReadOnly Gets the list of PresetSpawnPoints. |
PresetLevelConnectorPoint | PresetLevelConnectorPoint | ReadOnly Gets the PresetLevelConnectorPoint if there is one or null if none. |
PresetDungeonConnectorPoint | PresetDungeonConnectorPoint | ReadOnly Gets the PresetDungeonConnectorPoint if there is one or null if none. |
Methods
GetPresetRoomConnectorPointByRealDirection
public PresetRoomConnectorPoint GetPresetRoomConnectorPointByRealDirection(Direction direction);
Parameters
direction | Direction | The real direction of the requested PresetRoomConnectorPoint. |
Return
PresetRoomConnectorPoint | The PresetRoomConnectorPoint for the requested Direction. |
Description
Gets the PresetRoomConnectorPoint by a specified real Direction. Direction “None” would return null.
CalculatePresetRoomLocalPosition
public Vector3 CalculatePresetRoomLocalPosition();
Return
Vector3 | The calculated Room local position. |
Description
Calculates the PresetRoom local position.
RefreshCache
public void RefreshCache();
Description
Forces a refresh of the cached properties (basically all the ConnectorPoints stored in this instance).