Class Room
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Mirror.NetworkBehaviour
Room
Assembly: Dew.Core.dll
Syntax
[RequireComponent(typeof(RoomMap))]
[RequireComponent(typeof(RoomMonsters))]
[RequireComponent(typeof(RoomProps))]
[RequireComponent(typeof(RoomRifts))]
[RequireComponent(typeof(RoomRewards))]
[RequireComponent(typeof(RoomModifiers))]
[RequireComponent(typeof(RoomEditorMaintenance))]
public class Room : SingletonDewNetworkBehaviour<Room>, ILogicUpdate
Fields
availableCameraAngles
Declaration
public float[] availableCameraAngles
Field Value
Called everywhere everytime a footstep is done on an entity.
Declaration
public SafeAction<Entity> ClientEvent_OnFootstep
Field Value
ClientEvent_OnPrepareAsNonHostileRoom
Declaration
public SafeAction ClientEvent_OnPrepareAsNonHostileRoom
Field Value
ClientEvent_OnRoomClear
Declaration
public SafeAction ClientEvent_OnRoomClear
Field Value
ClientEvent_OnRoomStart
Declaration
public SafeAction ClientEvent_OnRoomStart
Field Value
ClientEvent_WaypointLocked
Declaration
public SafeAction<Room_Waypoint> ClientEvent_WaypointLocked
Field Value
ClientEvent_WaypointUnlocked
Declaration
public SafeAction<Room_Waypoint> ClientEvent_WaypointUnlocked
Field Value
defaultSurface
Declaration
public DewSurfaceData defaultSurface
Field Value
Declaration
[ReadOnly]
public DewRoomMetadata metadata
Field Value
music
Declaration
public DewMusicItem music
Field Value
onRemoveObstacles
This is called on server when this room needs to clear any progression obstacles.
e.g. Barriers, Locked Shrines of Despair
Declaration
public SafeAction onRemoveObstacles
Field Value
onRoomClear
Called on server when all combat sections are cleared / a hero steps on clear condition section.
Declaration
[FoldoutGroup("Events", 0)]
public UnityEvent onRoomClear
Field Value
| Type |
Description |
| UnityEngine.Events.UnityEvent |
|
openRoomExitOnClear
Declaration
[ToggleLeft]
public bool openRoomExitOnClear
Field Value
playerPathablePoints
Declaration
public readonly List<Vector3> playerPathablePoints
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><UnityEngine.Vector3> |
|
Properties
didClearRoom
Declaration
public bool didClearRoom { get; }
Property Value
didRemoveObstacles
Declaration
public bool didRemoveObstacles { get; set; }
Property Value
heroSpawnPos
Declaration
public Vector3 heroSpawnPos { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3 |
|
heroSpawnRot
Declaration
public Quaternion heroSpawnRot { get; }
Property Value
| Type |
Description |
| UnityEngine.Quaternion |
|
isActive
Declaration
public bool isActive { get; }
Property Value
isNonHostileRoom
Is this room modified to be a non-hostile room? Available everywhere.
Declaration
public bool isNonHostileRoom { get; set; }
Property Value
isRevisit
Are we revisiting this room? Available everywhere.
Declaration
public bool isRevisit { get; set; }
Property Value
map
Declaration
public RoomMap map { get; }
Property Value
modifiers
Declaration
public RoomModifiers modifiers { get; }
Property Value
monsters
Declaration
public RoomMonsters monsters { get; }
Property Value
numOfActivatedCombatAreas
Declaration
public int numOfActivatedCombatAreas { get; }
Property Value
props
Declaration
public RoomProps props { get; }
Property Value
rewards
Declaration
public RoomRewards rewards { get; }
Property Value
rifts
Declaration
public RoomRifts rifts { get; }
Property Value
sections
Declaration
public IList<RoomSection> sections { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IList<T><RoomSection> |
|
unlockedWaypoints
Declaration
public IReadOnlyList<Room_Waypoint> unlockedWaypoints { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IReadOnlyList<T><Room_Waypoint> |
|
Methods
AddUnlockedWaypoint(Room_Waypoint)
Declaration
public void AddUnlockedWaypoint(Room_Waypoint waypoint)
Parameters
Awake()
Declaration
protected override void Awake()
Overrides
SingletonDewNetworkBehaviour<Room>.Awake()
ClearRoom()
Declaration
GetFinalSection()
Get a section closest to exit rift.
Declaration
public RoomSection GetFinalSection()
Returns
GetHeroSpawnPosition()
Get randomly offset spawn position.
Declaration
public Vector3 GetHeroSpawnPosition()
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetHeroSpawnRotation()
Declaration
public Quaternion GetHeroSpawnRotation()
Returns
| Type |
Description |
| UnityEngine.Quaternion |
|
GetRoomRandom(int)
Get a random instance for this room. States for these random instances are persistent.
Declaration
public DewRandom GetRoomRandom(int offset)
Parameters
| Type |
Name |
Description |
| int |
offset |
|
Returns
GetSectionFromWorldPos(Vector3)
Declaration
public RoomSection GetSectionFromWorldPos(Vector3 pos)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
pos |
|
Returns
OnLateStart()
Declaration
public override void OnLateStart()
Overrides
OnLateStartServer()
Declaration
public override void OnLateStartServer()
Overrides
OnStartClient()
Declaration
public override void OnStartClient()
Overrides
OnStartServer()
Declaration
public override void OnStartServer()
Overrides
OverrideHeroSpawn(Vector3, Quaternion)
Declaration
public void OverrideHeroSpawn(Vector3 pos, Quaternion rot)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
pos |
|
| UnityEngine.Quaternion |
rot |
|
RemoveCombat(bool)
Disables enemy spawns, and removes any existing enemies or camps.
It is recommended to call this with Dew.CallDelayed() if you're calling it in RoomModifierBase.OnCreate().
Declaration
public void RemoveCombat(bool clearRoomOnEnteringLastSection)
Parameters
| Type |
Name |
Description |
| bool |
clearRoomOnEnteringLastSection |
|
RemoveObstacles()
Remove any kind of progression-blocking obstacles, like barriers, locked teleport shrines and such.
It is recommended to call this with Dew.CallDelayed() if you're calling it in RoomModifierBase.OnCreate().
Declaration
public void RemoveObstacles()
RemoveUnlockedWaypoint(Room_Waypoint)
Declaration
public void RemoveUnlockedWaypoint(Room_Waypoint waypoint)
Parameters
SetCameraAngleIndex_Local(int)
Declaration
public void SetCameraAngleIndex_Local(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
StartRoom()
Declaration
StopRoom()
Declaration
SyncCameraAngle()
Declaration
public void SyncCameraAngle()
Implements
Extension Methods