Exemple #1
0
 /// <summary>
 /// Trigger the Interactable.
 /// </summary>
 public override void onInteract()
 {
     ToggleSecurityDoors();
     AudioLibrary.PlayNormalSwitchSound();
     if (alertFlashOnInteract)
     {
         AlertFlash.inst.PlayAlertFlash();
     }
     if (_activatables.Length == 0)
     {
         return;
     }
     foreach (GameObject activatable in _activatables)
     {
         if (activatable.GetComponent <IActivatable>() != null)
         {
             activatable.GetComponent <IActivatable>().onActivate();
         }
     }
     _sprite.sprite = _pressedSprite;
     if (_reusable)
     {
         StartCoroutine(spriteTimer(0.4f));
     }
 }