Example #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));
     }
 }
Example #2
0
    //TODO: use struct to combine text to sound
    public void Shout(string speech, SoundBank.GoblinSound goblinSound)//, bool interrupt = false)
    {
        if (Fleeing() & !Team)
        {
            return;
        }


        //TODO: check that we are not already shouting, maybe control with queue, otherwise just stop previuos shout.
        Speak(goblinSound, true);

        StartCoroutine(ShoutRoutine(speech));
    }