public void playclip(string eventString) { StartRepeating(); foreach (NewSpeech ns in speechEv) { if (ns.speechTitle == eventString) { speechPlaying = ns; speechInt = 0; AS.clip = ns.subbedClips[speechInt].clip; speechPlaying.subbedClips[speechInt].speechText.text = ns.subbedClips[speechInt].subtitle; AS.Play(); isPlaying = true; return; } } }
protected void OnNewSpeech(object sender, RunnerEventArgs args) => NewSpeech?.Invoke(sender, args);