Class Room
The in-game room.
Inheritance
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public class Room : MonoBehaviour, IWorldSpace, IPosition, IRotation
Properties
| Improve this Doc View SourceAreLightsOff
Gets or sets a value indicating whether or not the lights in this room are currently off.
Declaration
public bool AreLightsOff { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Cameras
Declaration
public IReadOnlyCollection<Camera> Cameras { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<Camera> |
Color
Gets or sets the color of the room's lights by changing the warhead color.
Declaration
public Color Color { get; set; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Color |
Remarks
Will return UnityEngine.Color.clear when RoomLightController is null.
Doors
Declaration
public IReadOnlyCollection<Door> Doors { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<Door> |
GameObject
Gets the Room UnityEngine.GameObject.
Declaration
public GameObject GameObject { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.GameObject |
Identifier
Gets a reference to the room's MapGeneration.RoomIdentifier.
Declaration
public RoomIdentifier Identifier { get; }
Property Value
| Type | Description |
|---|---|
| MapGeneration.RoomIdentifier |
List
Declaration
public static IReadOnlyCollection<Room> List { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<Room> |
Name
Gets the Room name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Pickups
Declaration
public IEnumerable<Pickup> Pickups { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Pickup> |
Players
Declaration
public IEnumerable<Player> Players { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Player> |
Position
Gets the Room position.
Declaration
public Vector3 Position { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Vector3 |
RoomLightController
Gets the room's FlickerableLightController.
Declaration
public RoomLightController RoomLightController { get; }
Property Value
| Type | Description |
|---|---|
| RoomLightController |
RoomLightControllerNetIdentity
Gets the FlickerableLightController's NetworkIdentity.
Declaration
public NetworkIdentity RoomLightControllerNetIdentity { get; }
Property Value
| Type | Description |
|---|---|
| Mirror.NetworkIdentity |
RoomLightControllers
Gets a System.Collections.Generic.IReadOnlyCollection<T> of RoomLightController in the Room.
Declaration
public IReadOnlyCollection<RoomLightController> RoomLightControllers { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<RoomLightController> |
Remarks
Using that will make sense only for rooms with more than one light controller, in other cases better to use RoomLightController.
RoomName
Gets the MapGeneration.RoomName enum representing this room.
Declaration
public RoomName RoomName { get; }
Property Value
| Type | Description |
|---|---|
| MapGeneration.RoomName |
Remarks
This property is the internal MapGeneration.RoomName of the room. For the actual string of the Room's name, see Name.
See Also
| Improve this Doc View SourceRoomShape
Gets the room's MapGeneration.RoomShape.
Declaration
public RoomShape RoomShape { get; }
Property Value
| Type | Description |
|---|---|
| MapGeneration.RoomShape |
Rotation
Gets the Room rotation.
Declaration
public Quaternion Rotation { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Quaternion |
Speakers
Gets a System.Collections.Generic.IReadOnlyCollection<T> of PlayerRoles.PlayableScps.Scp079.Scp079Speaker in the Room.
Declaration
public IReadOnlyCollection<Scp079Speaker> Speakers { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<PlayerRoles.PlayableScps.Scp079.Scp079Speaker> |
TeslaGate
Gets a reference to the TeslaGate in the room, or null if this room does not contain one.
Declaration
public TeslaGate TeslaGate { get; }
Property Value
| Type | Description |
|---|---|
| TeslaGate |
Transform
Gets the Room UnityEngine.Transform.
Declaration
public Transform Transform { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Transform |
Type
Gets the RoomType.
Declaration
public RoomType Type { get; }
Property Value
| Type | Description |
|---|---|
| RoomType |
Windows
Declaration
public IReadOnlyCollection<Window> Windows { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyCollection<Window> |
Zone
Gets the ZoneType in which the room is located.
Declaration
public ZoneType Zone { get; }
Property Value
| Type | Description |
|---|---|
| ZoneType |
Methods
| Improve this Doc View SourceBlackout(Single, DoorLockType)
Locks all the doors and turns off all lights in the room.
Declaration
public void Blackout(float duration, DoorLockType lockType = DoorLockType.Regular079)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | duration | Duration in seconds, or |
| DoorLockType | lockType | DoorLockType of the blackout. |
See Also
| Improve this Doc View SourceFindParentRoom(GameObject)
Tries to find the room that a GameObject is inside, first using the Transform's parents, then using a Raycast if no room was found.
Declaration
public static Room FindParentRoom(GameObject objectInRoom)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.GameObject | objectInRoom | The GameObject inside the room. |
Returns
| Type | Description |
|---|---|
| Room | The Room that the GameObject is located inside. Can be null. |
See Also
| Improve this Doc View SourceGet(RoomType)
Declaration
public static Room Get(RoomType roomType)
Parameters
| Type | Name | Description |
|---|---|---|
| RoomType | roomType | The RoomType to search for. |
Returns
| Type | Description |
|---|---|
| Room |
Get(ZoneType)
Declaration
public static IEnumerable<Room> Get(ZoneType zoneType)
Parameters
| Type | Name | Description |
|---|---|---|
| ZoneType | zoneType | The ZoneType to search for. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Room> |
Get(RoomIdentifier)
Gets a Room from a given Identifier.
Declaration
public static Room Get(RoomIdentifier roomIdentifier)
Parameters
| Type | Name | Description |
|---|---|---|
| MapGeneration.RoomIdentifier | roomIdentifier | The Identifier to search with. |
Returns
| Type | Description |
|---|---|
| Room | The Room of the given identified, if any. Can be null. |
Get(RelativePosition)
Gets a Room given the specified RelativePositioning.RelativePosition.
Declaration
public static Room Get(RelativePosition position)
Parameters
| Type | Name | Description |
|---|---|---|
| RelativePositioning.RelativePosition | position | The RelativePositioning.RelativePosition to search for. |
Returns
| Type | Description |
|---|---|
| Room | The Room with the given RelativePositioning.RelativePosition or null if not found. |
Get(RoomLightController)
Gets a Room from a given MapGeneration.RoomIdentifier.
Declaration
public static Room Get(RoomLightController flickerableLightController)
Parameters
| Type | Name | Description |
|---|---|---|
| RoomLightController | flickerableLightController | The RoomLightController to search with. |
Returns
| Type | Description |
|---|---|
| Room | The Room of the given identified, if any. Can be null. |
Get(Func<Room, Boolean>)
Gets a System.Collections.Generic.IEnumerable<T> of Room filtered based on a predicate.
Declaration
public static IEnumerable<Room> Get(Func<Room, bool> predicate)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<Room, System.Boolean> | predicate | The condition to satify. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Room> | A System.Collections.Generic.IEnumerable<T> of Room which contains elements that satify the condition. |
Get(Vector3)
Gets a Room given the specified UnityEngine.Vector3.
Declaration
public static Room Get(Vector3 position)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Vector3 | position | The UnityEngine.Vector3 to search for. |
Returns
| Type | Description |
|---|---|
| Room | The Room with the given UnityEngine.Vector3 or null if not found. |
LocalPosition(Vector3)
Returns the local space position, based on a world space position.
Declaration
public Vector3 LocalPosition(Vector3 position)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Vector3 | position | World position. |
Returns
| Type | Description |
|---|---|
| UnityEngine.Vector3 | Local position, based on the room. |
LockDown(Single, DoorLockType)
Locks all the doors in the room.
Declaration
public void LockDown(float duration, DoorLockType lockType = DoorLockType.Regular079)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | duration | Duration in seconds, or |
| DoorLockType | lockType | DoorLockType of the lockdown. |
See Also
Random(ZoneType)
Gets a random Room.
Declaration
public static Room Random(ZoneType zoneType = ZoneType.Unspecified)
Parameters
| Type | Name | Description |
|---|---|---|
| ZoneType | zoneType | Filters by ZoneType. |
Returns
| Type | Description |
|---|---|
| Room | Room object. |
ResetColor()
Resets the room color to default.
Declaration
public void ResetColor()
ToString()
Returns the Room in a human-readable format.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string containing Room-related data. |
Overrides
TurnOffLights(Single)
Flickers the room's lights off for a duration.
Declaration
public void TurnOffLights(float duration = -1F)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | duration | Duration in seconds, or -1 for an indefinite duration. |
UnlockAll()
Unlocks all the doors in the room.
Declaration
public void UnlockAll()
See Also
WorldPosition(Vector3)
Returns the World position, based on a local space position.
Declaration
public Vector3 WorldPosition(Vector3 offset)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Vector3 | offset | Local position. |
Returns
| Type | Description |
|---|---|
| UnityEngine.Vector3 | World position, based on the room. |