示例#1
0
        public override void Run_Node()
        {
            if (ActorManager.Is_Actor_On_Scene(actor_name))
            {
                Actor actor = ActorManager.Get_Actor(actor_name);
                SaveManager.SetSaveFeature(this, actor.gameObject);

                Debug.Log("Actor on scene " + actor.actor_name);

                if (fade_in_new_image)
                {
                    Sprite old_sprite = actor.cur_image.overrideSprite;

                    if (lighten_actor)
                    {
                        actor.Lighten();
                    }
                    if (bring_actor_to_front)
                    {
                        ActorManager.Bring_Actor_To_Front(actor);
                    }

                    // Fade out old image
                    actor.fading_child_image.gameObject.SetActive(true);
                    actor.fading_child_image.overrideSprite = old_sprite;

                    // Set colour of old image to match current image
                    actor.fading_child_image.color = actor.cur_image.color;
                    actor.fading_child_image.GetComponent <RectTransform>().sizeDelta = actor.rect.sizeDelta;
                    StartCoroutine(Fade_Out_Coroutine(fade_out_time, actor.fading_child_image));

                    // Fade in new image
                    actor.cur_image.overrideSprite = new_image;
                    StartCoroutine(Fade_In_Coroutine(fade_out_time, actor.cur_image));

                    // Wait before we allow it to finish
                    StartCoroutine(Wait(actor, fade_out_time * 1.1f));
                }
                else
                {
                    Debug.Log("Actor on scene " + actor.actor_name);

                    actor.cur_image.overrideSprite = new_image;
                    Finish_Node();
                }
            }
            else
            {
                Finish_Node();

                Debug.Log(actor_name + " is not on the scene. Remember to correctly name your actor and use 'EnterActorNode'");
            }
        }
示例#2
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;
            }
        }
示例#3
0
        public string actor_name;   // Actor to bring forward


        public override void Run_Node()
        {
            ActorManager.Bring_Actor_To_Front(ActorManager.Get_Actor(actor_name));

            Finish_Node();
        }