-
Notifications
You must be signed in to change notification settings - Fork 16
TriggerCallback
Namespace: TommoJProductions.ModApi.Attachable
Represents call back for triggers.
public class TriggerCallback : UnityEngine.MonoBehaviourInheritance Object → Object → Component → Behaviour → MonoBehaviour → TriggerCallback
Represents The Trigger Data. any part can install onto a trigger with the same trigger data.
public TriggerData triggerData;Represents the part that is currently installed to this trigger. note null if no installed part.
public Part part { get; }Represents the trigger that is instance is linked to.
public Trigger trigger { get; internal set; }public bool useGUILayout { get; set; }public bool enabled { get; set; }public bool isActiveAndEnabled { get; }public Transform transform { get; }Transform
public GameObject gameObject { get; }GameObject
public string tag { get; set; }public string name { get; set; }public HideFlags hideFlags { get; set; }HideFlags
public TriggerCallback()internal void setPart(Part part)part Part
checks all parts that have this trigger to see if is a Part and that it can be installed to this trigger.
protected virtual bool triggerCheck(Collider col, Part& part)col Collider
The collider that was in the trigger.
part Part&
the Part that was in the trigger, null if wasn't a Part or if the part can't be installed to this trigger.
Occurs when a collider exits this trigger.
protected virtual void OnTriggerExit(Collider collider)collider Collider
the collider that invoked this
Occurs when a collider enters this trigger.
protected virtual void OnTriggerEnter(Collider collider)collider Collider
the collider that invoked this
Represents the on trigger exit event.
public event Action<Part, Trigger> onTriggerExit;Represents the on trigger enter event.
public event Action<Part, Trigger> onTriggerEnter;