Пример #1
0
 private void UpdateRingEmitterState()
 {
     if (_audioSource.isPlaying)
     {
         _ringEmitter.StartEmitting();
     }
     else
     {
         _ringEmitter.StopEmitting();
     }
 }
Пример #2
0
    private IEnumerator OnInteraction()
    {
        _goal.StartGoal();

        _audioSource.Stop();
        _audioRingEmitterController.StopEmitting();

        if (_audioLowPassFilter != null)
        {
            _audioLowPassFilter.enabled = false;
        }

        _audioSource.spatialBlend = 0;
        _audioSource.volume       = 1;
        _audioSource.panStereo    = -1;
        _audioSource.PlayOneShot(_talkingClip);

        yield return(new WaitForSeconds(_talkingClip.length));

        _goal.Finish();
        _audioLowPassFilter.enabled = true;
    }