Class RoomSection
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
RoomSection
Assembly: Dew.Core.dll
Syntax
[RequireComponent(typeof(RoomSavedObject))]
[RequireComponent(typeof(Section_Monsters))]
[RequireComponent(typeof(Section_Props))]
public class RoomSection : LogicBehaviour, ILogicUpdate, IPlayerPathablePoint
Fields
BanSpotsDistance
Declaration
public const float BanSpotsDistance = 3.25
Field Value
clearRoomOnEnterFirstTime
Declaration
[ToggleLeft]
public bool clearRoomOnEnterFirstTime
Field Value
onEnterFirstTime
Declaration
[FoldoutGroup("Events", 0)]
public UnityEvent onEnterFirstTime
Field Value
| Type |
Description |
| UnityEngine.Events.UnityEvent |
|
onEntitiesChanged
Declaration
[FoldoutGroup("Events", 0)]
public UnityEvent onEntitiesChanged
Field Value
| Type |
Description |
| UnityEngine.Events.UnityEvent |
|
onEntityEnter
Declaration
[FoldoutGroup("Events", 0)]
public UnityEvent<Entity> onEntityEnter
Field Value
| Type |
Description |
| UnityEngine.Events.UnityEvent<T0><Entity> |
|
onEntityExit
Declaration
[FoldoutGroup("Events", 0)]
public UnityEvent<Entity> onEntityExit
Field Value
| Type |
Description |
| UnityEngine.Events.UnityEvent<T0><Entity> |
|
onEveryonePresent
Declaration
[FoldoutGroup("Events", 0)]
public UnityEvent onEveryonePresent
Field Value
| Type |
Description |
| UnityEngine.Events.UnityEvent |
|
vectors
Declaration
Field Value
| Type |
Description |
| UnityEngine.Vector2[] |
|
waitForAggroedEnemiesToDie
Declaration
[ToggleLeft]
[ShowIf("clearRoomOnEnterFirstTime", true)]
public bool waitForAggroedEnemiesToDie
Field Value
Properties
area
Declaration
public float area { get; }
Property Value
entities
Declaration
public IReadOnlyList<Entity> entities { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IReadOnlyList<T><Entity> |
|
monsters
Declaration
public Section_Monsters monsters { get; }
Property Value
nodes
Declaration
public IReadOnlyList<Vector3> nodes { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IReadOnlyList<T><UnityEngine.Vector3> |
|
numOfHeroes
Declaration
public int numOfHeroes { get; }
Property Value
pathablePivot
Declaration
public Vector3 pathablePivot { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3 |
|
props
Declaration
public Section_Props props { get; }
Property Value
Methods
GetAnyRandomNode()
Declaration
public Vector3 GetAnyRandomNode()
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetGoodWanderPosition(Vector3)
Declaration
public Vector3 GetGoodWanderPosition(Vector3 from)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
from |
|
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetNavDistanceTo(RoomSection)
Declaration
public float GetNavDistanceTo(RoomSection sec)
Parameters
Returns
GetRandomLocalPosition(DewRandom)
Declaration
public Vector3 GetRandomLocalPosition(DewRandom random = null)
Parameters
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetRandomWorldPosition(DewRandom)
Declaration
public Vector3 GetRandomWorldPosition(DewRandom random = null)
Parameters
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
LogicUpdate(float)
Declaration
public override void LogicUpdate(float dt)
Parameters
| Type |
Name |
Description |
| float |
dt |
|
Overrides
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
Declaration
protected override void OnEnable()
Overrides
OverlapPoint(Vector2)
Available only on runtime.
Declaration
public bool OverlapPoint(Vector2 point)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector2 |
point |
|
Returns
ResetUsedNodeIndices()
Declaration
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.
Declaration
public bool TryGetGoodNodePosition(out Vector3 position, DewRandom random = null)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
position |
|
| DewRandom |
random |
|
Returns
Explicit Interface Implementations
IPlayerPathablePoint.pathablePosition
Declaration
Vector3 IPlayerPathablePoint.pathablePosition { get; }
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
Implements
Extension Methods