// Start is called before the first frame update
 void Start()
 {
     audioSources = GetComponents <AudioSource>();
     AlarmStateChanged.AddListener(onAlarmStateChanged);
     setVolumeAllAudioSources(0);
     currentAudioSource        = audioSources[0];
     currentAudioSource.volume = maxVolume;
 }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     alarmSlider                   = GetComponent <Slider>();
     tracker                       = GameObject.FindObjectOfType <AlarmTracker>();
     blinkAnimation                = GetComponent <ColourBlinkAnimation>();
     spikeAnimation                = GetComponent <ColourSpikeAnimation>();
     bellShake                     = GetComponent <BellShakeAnimation>();
     bellColourAnimation           = GetComponent <ColourEaseAnimation>();
     alarmSlider.value             = 0;
     tracker.OnAlarmLevelIncrease += onAlarmLevelIncreased;
     tracker.OnAlarmLevelDecrease += onAlarmLevelDecreased;
     AlarmStateChanged.AddListener(onAlarmStateChanged);
     ResolutionScreenSetup.OnLoadCheckpoint += onLoadCheckpoint;
 }
예제 #3
0
        // Start is called before the first frame update
        void Start()
        {
            if (isPatrolling)
            {
                FSM.ChangeState <PatrolState>();
            }
            else
            {
                FSM.ChangeState <IdleState>();
            }

            abstractAlarmManager.AbstractAlarmActivated += onAbstractAlarmActivated;
            AlarmStateChanged.AddListener(onAlarmStateChanged);
            ResolutionScreenSetup.OnLoadCheckpoint += onLoadCheckpoint;
        }