private void OnTriggerExit(Collider other) { if (!WaitForInteraction && other.CompareTag("Player")) { setTrigger(HashTriggerOff); SoundUtils.PlayAudioEvent(AudioDeactivated, base.gameObject); } }
public void OnInteraction() { if (!isActive) { setTrigger(HashTriggerOn); SoundUtils.PlayAudioEvent(AudioActivated, base.gameObject); } else { setTrigger(HashTriggerOff); SoundUtils.PlayAudioEvent(AudioDeactivated, base.gameObject); } isActive = !isActive; }