示例#1
0
 //TODO: inherit this for each type of character to differentiate sound sets
 public void Speak(SoundBank.GoblinSound soundtype, bool overridePlaying = false)
 {
     if (InArea.Visible() && Voice && Voice.isActiveAndEnabled && (overridePlaying || !Voice.isPlaying))
     {
         Voice.PlayOneShot(SoundBank.GetSound(soundtype));
     }
 }
示例#2
0
    public void Speak(PlayerController.Shout shout, bool overridePlaying = false)
    {
        if (InArea.Visible() && Voice && Voice.isActiveAndEnabled && lastSpeak + speakWait < Time.time && (overridePlaying || !Voice.isPlaying))
        {
            StartCoroutine(ShoutRoutine(shout.Speech));

            Voice.PlayOneShot(shout.GoblinSound);

            lastSpeak = Time.time;
        }
    }