Skip to main content

TriggerArea

A class in Root.Township, the global namespace.

A space-defined area of SpacePoints that fires events on entering and leaving, passing whether the closest point's weight is over half.

Constructors​

MemberWhat it is
TriggerArea()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private BoolUnityEvent onEnterAreaBool event fired on entering the area.
private BoolUnityEvent onExitAreaBool event fired on leaving the area.
private SpacePoint[] spacePointsBacking field for Points.

Properties​

MemberWhat it is
override IEnumerable<SpacePoint> Points { get; }The area's space points.

Methods​

MemberWhat it is
protected override void EnterArea()Invokes onEnterArea with whether the closest point's set weight is above 0.5.
protected override void ExitArea()Invokes onExitArea with whether the closest point's set weight is above 0.5.
protected override void SendNewCloserPoint(SpacePoint from, SpacePoint to, float progress)Does nothing here.