示例#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;
        }
    }
示例#3
0
 public static InArea instance;  // Start is called before the first frame update
 private void Awake()
 {
     instance = this;
 }
示例#4
0
 // Start is called before the first frame update
 void Start()
 {
     inArea_   = InArea.instance;
     Throw_Dir = new Vector2(0f, -1f);
 }