Esempio n. 1
0
    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();
    }
Esempio n. 2
0
    void Close()
    {
        IAvatar avatar = actingInScene.GetMainAvatar();

        avatar.OnSubtitleStop();
        StopFacialAnimation(speakingActor);
        ComponentDone();
    }