Esempio n. 1
0
    private void AssessFearLevel()
    {
        // Check the mic volume
        float volume = micInput.loudness;

        print(volume);
        // Is it enough to be scared?
        if (volume >= _braveryThreshold)
        {
            EnterHide(hideFor: _braveryCooldownTarget);

            RunAway(fromthewitch: false);
            // Add to the witch noise mechanic.
            // Make sure the values are in line with the noise made from moving objects.
            _noiseScript.AddToNoise(volume * 10);
        }
    }
 public void updateNoiseBar(float noise)
 {
     _noiseScript.AddToNoise(noise);
 }