public void Update() { if (!ShouldUpdate) { return; } if (actorClip != null && actingInScene.GetGameObject().GetComponent <AudioSource>().isPlaying) { return; } if (actorClip != null) { IAvatar avatar = actingInScene.GetMainAvatar(); avatar.OnSubtitleStop(); } if (customAnimation != null) { var currentAnimation = speakingActor.GetComponent <Animation>()[customAnimation.name]; if (currentAnimation.normalizedTime < 1.0 && speakingActor.GetComponent <Animation>().IsPlaying(customAnimation.name)) { return; } } Close(); }
void Close() { IAvatar avatar = actingInScene.GetMainAvatar(); avatar.OnSubtitleStop(); StopFacialAnimation(speakingActor); ComponentDone(); }