// 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 AlarmTriggered events. AlarmTriggered.AddListener(onAlarmTriggered); }
// Start is called before the first frame update void Start() { soundEffect = FindObjectOfType <SoundEffectManager>().GetSoundEffect(GeneralVariables.SFX.ALARM_TRIGGERED); AlarmTriggered.AddListener(onAlarmTriggered); CameraTriggered.AddListener(onCameraTriggered); }