public void TriggerChangeRight(RaycastPressEvents trigger) { if (trigger != null) { rightTrigger = trigger; } }
public void TriggerChangeLeft(RaycastPressEvents trigger) { if (trigger != null) { leftTrigger = trigger; } }
private void Awake() { // If we have no default trigger on the left or right, supply an empty trigger emptyTrigger = GameManager.instance.GetComponent <RaycastPressEvents>(); if (emptyTrigger == null) { emptyTrigger = GameManager.instance.gameObject.AddComponent <RaycastPressEvents>(); } if (rightTrigger == null) { rightTrigger = emptyTrigger; } if (leftTrigger == null) { leftTrigger = emptyTrigger; } }
public void TriggerChangeBoth(RaycastPressEvents trigger) { TriggerChangeRight(trigger); TriggerChangeLeft(trigger); }