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