![]() | Trigger Class |
Namespace: DustProductions.TriggerMeTimbers
public abstract class Trigger : MonoBehaviour, IComponentAddedHandler
The Trigger type exposes the following members.
Name | Description | |
---|---|---|
![]() | CheckTriggerString |
A convenience method that can be used to determine if either TrueTrigger or FalseTrigger have certain values. This will also automatically call HitTrigger for you if it finds a match.
|
![]() | GetTriggerDropdownOptions |
Triggers are responsible for defining what their triggers actually are. This method is used to fetch the strings to display in the editor dropdowns for TrueTrigger and FalseTrigger.
|
![]() | HandleComponentAdded |
Can be called by ITriggerables to add to the Triggerables array. If a ITriggerable is added to this component, it will be added to the array.
|
![]() | HitTrigger |
Called when something the Trigger cares about has happened. You can call this directly, or indirectly using CheckTriggerString().
|
![]() | OnValidate |
The OnValidate method called by Unity.
|
![]() | Reset |
The Reset method called by Unity.
|
![]() | WaitRoutine |
This will be called if there is a delay between when the a trigger is hit, and when we want to notify the Triggerables about the hit.
|
Name | Description | |
---|---|---|
![]() | CachedFalseWaitRoutine |
A reference to any currently running wait Coroutines for when false has been hit. Used to make it easy to cancel if another trigger is hit while it is running.
|
![]() | CachedTrueWaitRoutine |
A reference to any currently running wait Coroutines for when true has been hit. Used to make it easy to cancel if another trigger is hit while it is running.
|
![]() | FalseTrigger |
When should this Trigger send the false status to its referenced Triggerables?
|
![]() | LastTriggerSent |
Keeps track of the last value sent by this Trigger, if there is a value.
|
![]() ![]() | NoneTriggerString |
By default, "None" is the only Trigger available. Triggers are responsible for defining their Triggers themselves.
|
![]() | Triggerables |
The ITriggerable MonoBehaviours that will be notified when a Trigger has been hit.
|
![]() | TriggerDropdownOptions |
This field is used to define what will show up in the dropdown for a Trigger. It is hidden by default because it should not be modified in the inspector, only by code using GetTriggerDropdownOptions().
|
![]() | TrueTrigger |
When should this Trigger send the true status to its referenced Triggerables?
|