示例#1
0
        public override void Run_Node()
        {
            VNSceneManager.scene_manager.Show_UI(true);  // Ensure dialogue panel is visible

            running = true;

            UIManager.ui_manager.text_panel.text = "";

            // Get localized text and sub in Stats values
            GetLocalizedText(false);

            StartCoroutine(Animate_Text(text));

            // If the actor field is filled in and the actor is present on the scene
            Actor speaker = ActorManager.Get_Actor(actor);

            if (actor != "" &&
                speaker != null)
            {
                // Slightly darken all other actors
                if (darken_all_other_characters)
                {
                    ActorManager.Darken_All_Actors_But(speaker);
                }

                // Lighten this actor to show this one is talking
                speaker.Lighten();

                // Bring this actor to the front
                if (bring_speaker_to_front)
                {
                    ActorManager.Bring_Actor_To_Front(speaker);
                }
            }

            if (voice_clip != null && voice_clip.clip != null)
            {
                // Play audio if there is any
                voice_clip.volume = AudioManager.audio_manager.voice_volume;
                voice_clip.Play();
            }
            else
            {
                done_voice_clip  = true;
                no_voice_playing = true;
            }
        }