Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     if (AlarmGroup != null)
     {
         abstractAlarms = AlarmGroup.GetComponentsInChildren <AbstractAlarm>();
     }
     else
     {
         abstractAlarms = new AbstractAlarm[0];
     }
     AlarmTriggered.AddListener(onAlarmTriggered);
     CameraTriggered.AddListener(onCameraTriggered);
 }
 // Start is called before the first frame update
 void Start()
 {
     //Listen to CameraTriggered events.
     CameraTriggered.AddListener(onCameraTriggered);
 }
 // Start is called before the first frame update
 void Start()
 {
     soundEffect = FindObjectOfType <SoundEffectManager>().GetSoundEffect(GeneralVariables.SFX.ALARM_TRIGGERED);
     AlarmTriggered.AddListener(onAlarmTriggered);
     CameraTriggered.AddListener(onCameraTriggered);
 }