Click or drag to resize

Trigger Class

Triggers are objects that care about something in the world and notify Triggerables when the thing they care about happens. The notification is in the form of either sending the Triggerable true or false.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          DustProductions.TriggerMeTimbersTrigger
            More...

Namespace:  DustProductions.TriggerMeTimbers
Assembly:  DustProductions.TriggerMeTimbers (in DustProductions.TriggerMeTimbers.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public abstract class Trigger : MonoBehaviour, 
	IComponentAddedHandler

The Trigger type exposes the following members.

Constructors
  NameDescription
Protected methodTrigger
Initializes a new instance of the Trigger class
Top
Methods
  NameDescription
Protected methodCheckTriggerString
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.
Protected methodGetTriggerDropdownOptions
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.
Public methodHandleComponentAdded
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.
Protected methodHitTrigger
Called when something the Trigger cares about has happened. You can call this directly, or indirectly using CheckTriggerString().
Protected methodOnValidate
The OnValidate method called by Unity.
Protected methodReset
The Reset method called by Unity.
Protected methodWaitRoutine
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.
Top
Fields
  NameDescription
Protected fieldCachedFalseWaitRoutine
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.
Protected fieldCachedTrueWaitRoutine
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.
Protected fieldFalseTrigger
When should this Trigger send the false status to its referenced Triggerables?
Protected fieldLastTriggerSent
Keeps track of the last value sent by this Trigger, if there is a value.
Protected fieldStatic memberNoneTriggerString
By default, "None" is the only Trigger available. Triggers are responsible for defining their Triggers themselves.
Protected fieldTriggerables
The ITriggerable MonoBehaviours that will be notified when a Trigger has been hit.
Protected fieldTriggerDropdownOptions
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().
Protected fieldTrueTrigger
When should this Trigger send the true status to its referenced Triggerables?
Top
See Also
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          DustProductions.TriggerMeTimbersTrigger
            DustProductions.TriggerMeTimbersTriggerFilter
            DustProductions.TriggerMeTimbersTriggerOnAwake
            DustProductions.TriggerMeTimbersTriggerOnButtonClick
            DustProductions.TriggerMeTimbersTriggerOnColliderTrigger
            DustProductions.TriggerMeTimbersTriggerOnCollision
            DustProductions.TriggerMeTimbersTriggerOnDrag
            DustProductions.TriggerMeTimbersTriggerOnEnable
            DustProductions.TriggerMeTimbersTriggerOnHover
            DustProductions.TriggerMeTimbersTriggerOnInputText
            DustProductions.TriggerMeTimbersTriggerOnKeyPress
            DustProductions.TriggerMeTimbersTriggerOnPointerClick
            DustProductions.TriggerMeTimbersTriggerOnSceneLoad
            DustProductions.TriggerMeTimbersTriggerOnStart
            DustProductions.TriggerMeTimbersTriggerOnTimer
            DustProductions.TriggerMeTimbersTriggerOnToggled
            DustProductions.TriggerMeTimbersTriggerOnUpdate