Table of Contents

Class InteractableTriggers

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

OnInteract triggers a module attaches to every interactable of a kind, at run time, so the interactable's prefab names nothing of the module (removing the module removes the behaviour and leaves the prefab whole).

public static class InteractableTriggers
Inheritance
InteractableTriggers
Inherited Members

Remarks

The Travel module attaches its "Waypoint Interact" trigger (discover the waypoint, count it) to every Waypoint. Attached triggers run after the interactable's own authored ones; a kind matches its subclasses too. Server side, like every OnInteract trigger.

Methods

Attach(Type, Trigger)

Attaches trigger to every interactable of interactableType (and its subclasses).

public static void Attach(Type interactableType, Trigger trigger)

Parameters

interactableType Type
trigger Trigger

Detach(Type, Trigger)

Detaches what Attach(Type, Trigger) attached; false when it was not attached.

public static bool Detach(Type interactableType, Trigger trigger)

Parameters

interactableType Type
trigger Trigger

Returns

bool

For(Type)

The triggers attached to interactableType and its base types, in attach order. Do not modify.

public static List<Trigger> For(Type interactableType)

Parameters

interactableType Type

Returns

List<Trigger>