Skip to content

Class: RoomSection ​

  • Namespace: Global
  • Assembly: Dew.Core.dll
  • Inheritance / Derived: LogicBehaviour
csharp
[RequireComponent(typeof(RoomSavedObject))]
[RequireComponent(typeof(Section_Monsters))]
[RequireComponent(typeof(Section_Props))]
public class RoomSection : LogicBehaviour, ILogicUpdate, IPlayerPathablePoint

Fields ​

NameDeclarationDescription
BanSpotsDistancepublic const float BanSpotsDistance = 3.25
clearRoomOnEnterFirstTime`[ToggleLeft]
public bool clearRoomOnEnterFirstTime`
onEnterFirstTime`[FoldoutGroup("Events", 0)]
public UnityEvent onEnterFirstTime`
onEntitiesChanged`[FoldoutGroup("Events", 0)]
public UnityEvent onEntitiesChanged`
onEntityEnter`[FoldoutGroup("Events", 0)]
public UnityEvent<Entity> onEntityEnter`
onEntityExit`[FoldoutGroup("Events", 0)]
public UnityEvent<Entity> onEntityExit`
onEveryonePresent`[FoldoutGroup("Events", 0)]
public UnityEvent onEveryonePresent`
vectorspublic Vector2[] vectors
waitForAggroedEnemiesToDie`[ToggleLeft]
[ShowIf("clearRoomOnEnterFirstTime", true)]
public bool waitForAggroedEnemiesToDie`

Properties ​

NameDeclarationDescription
areapublic float area { get; }
entitiespublic IReadOnlyList&lt;Entity&gt; entities { get; }
monsterspublic Section_Monsters monsters { get; }
nodespublic IReadOnlyList&lt;Vector3&gt; nodes { get; }
numOfHeroespublic int numOfHeroes { get; }
pathablePivotpublic Vector3 pathablePivot { get; }
propspublic Section_Props props { get; }

Methods ​

GetAnyRandomNode() ​

Get any random node.

csharp
public Vector3 GetAnyRandomNode()

Returns: UnityEngine.Vector3

GetGoodWanderPosition(Vector3) ​

csharp
public Vector3 GetGoodWanderPosition(Vector3 from)

Parameters:

NameTypeDescription
fromUnityEngine.Vector3

Returns: UnityEngine.Vector3

GetNavDistanceTo(RoomSection) ​

csharp
public float GetNavDistanceTo(RoomSection sec)

Parameters:

NameTypeDescription
secRoomSection

Returns: float

GetRandomLocalPosition(DewRandom) ​

csharp
public Vector3 GetRandomLocalPosition(DewRandom random = null)

Parameters:

NameTypeDescription
randomDewRandom

Returns: UnityEngine.Vector3

GetRandomWorldPosition(DewRandom) ​

csharp
public Vector3 GetRandomWorldPosition(DewRandom random = null)

Parameters:

NameTypeDescription
randomDewRandom

Returns: UnityEngine.Vector3

LogicUpdate(float) ​

csharp
public override void LogicUpdate(float dt)

Parameters:

NameTypeDescription
dtfloat

OnDisable() ​

csharp
protected override void OnDisable()

OnEnable() ​

csharp
protected override void OnEnable()

OverlapPoint(Vector2) ​

Available only on runtime.

csharp
public bool OverlapPoint(Vector2 point)

Parameters:

NameTypeDescription
pointUnityEngine.Vector2

Returns: bool

ResetUsedNodeIndices() ​

csharp
public void ResetUsedNodeIndices()

TryGetGoodNodePosition(out Vector3, DewRandom) ​

Try to pick a node that hasn't been used that's not too close to previously used node.Returns false if suboptimal position is returned.

csharp
public bool TryGetGoodNodePosition(out Vector3 position, DewRandom random = null)

Parameters:

NameTypeDescription
positionUnityEngine.Vector3
randomDewRandom

Returns: bool

Maintained by the Shape of Dreams Modding Community