Triggers

Learn more about included trigger components.

There are multiple triggers available in the framework that will most likely to fit your basic needs. All of them are currently Collider based.

There are two abstract classes: superclass for the Collider based triggers and Activation Delayed trigger. You can find them in Triggers -> abstract. Nevertheless, abstract means that you cannot, neither it's needed, instantiate these classes alone. Eventually, they contain no triggering logic. What they do is provides you with the set of basic parameters that will be useful for this type of triggers.

CoreColliderBasedPuzzleTriggers

At first, it ensures that the object has a Collider component on it.

At second, it provides a field where you can specify all tags that will be tracked. By default, there is a single active tag, "Player". It means that only game objects with the tag "Player" will be able to trigger it.

ActivationDelayedPuzzleTriggers

Provides basic fields and methods for the triggers that need a continuous interaction in order to be activated. It contains the activationDelay property that specifies the time needed to activate the trigger. Moreover, it contains ProceedDelay coroutine that handles this delay and invokes TriggerImpl at the end.

You must inherit CorePuzzleTrigger for your own triggers. See the corresponding section in order to understand what kind of methods and fields are available to you.

It's recommended to inherit CoreColliderBasedTrigger if you want to write your own more complex Collider based triggers, although not enforced.

Note that, in its turn, CoreColliderBasedTrigger inherits from CorePuzzleTrigger, meaning that in this case you don't have to inherit the latter.

ActivationDelayedPuzzleTriggers in its turn inherits from CoreColliderBasedTrigger.

OnTriggerEventPuzzleTrigger

This type of trigger will require the object with the compatible tags to enter or exit a dedicated collider-trigger zone.

OnKeyEventPuzzleTrigger

This type of trigger will require the object with the compatible tags to click a specific key on the keyboard while inside the collider-trigger zone.

OnMouseEventPuzzleTrigger

This type of trigger will require the mouse button to interact with its collider.

Last updated