public override void Run_Node() { if (ActorManager.Is_Actor_On_Scene(actor_name)) { if (!slide_out && !fade_out) { ActorManager.Remove_Actor(actor_name); Finish_Node(); } else { Actor actor = ActorManager.Get_Actor(actor_name); if (fade_out) { // Fade out actor.Fade_Out(fade_out_time); } else { // Slide out actor.Slide_Out(1f); } StartCoroutine(Wait(actor)); } } else { Debug.Log(actor_name + " is not on the scene. Remember to correctly name your actor and use 'EnterActorNode'"); Finish_Node(); } }
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'"); } }
public override void Run_Node() { Actor actor_script; // Check if the actor is already present if (ActorManager.Is_Actor_On_Scene(actor_name)) { // Actor is already on the scene Debug.Log("Actor " + actor_name + " already on scene"); actor_script = ActorManager.Get_Actor(actor_name).GetComponent <Actor>(); Finish_Node(); return; } else { // Actor is not in the scene. Instantiate it if (VNSceneManager.verbose_debug_logs) { Debug.Log("Creating new actor " + actor_name); } if (destination == Actor_Positions.CUSTOM && custom_position != null) { actor_script = ActorManager.Instantiate_Actor(actor_name, destination, custom_position); } else { actor_script = ActorManager.Instantiate_Actor(actor_name, destination); } } SaveManager.SetSaveFeature(this, actor_script.gameObject); switch (entrance_type) { case Entrance_Type.Slide_In: actor_script.Slide_In(destination, 2.0f); Finish_Node(); break; case Entrance_Type.Fade_In: actor_script.Place_At_Position(destination); actor_script.Fade_In(fade_in_time); StartCoroutine(Wait(fade_in_time + 0.2f)); break; case Entrance_Type.None: Finish_Node(); break; } }
public override void Run_Node() { // Check if the Actor is on the scene if (!ActorManager.Is_Actor_On_Scene(actor_name)) { Debug.LogError(actor_name + " actor is not on the scene. Please use an Enter Actor Node for " + actor_name); Finish_Node(); return; } ActorManager.Move_Actor_Outwards(ActorManager.Get_Actor(actor_name)); if (wait_until_actor_has_stopped) { StartCoroutine(Wait_Until_Actor_Is_Stopped()); } else { Finish_Node(); } }
public override void Run_Node() { if (string.IsNullOrEmpty(actor)) { Debug.LogError("Actor " + actor + " name is null or empty", this.gameObject); } // Check if the actor is already present else if (ActorManager.Is_Actor_On_Scene(actor)) { // Actor is already on the scene Actor actor_script = ActorManager.Get_Actor(actor); actor_script.position = destination; ActorManager.Remove_Actor_From_Positions_Lists(actor_script); ActorManager.Add_Actor_To(actor_script, destination); } else { Debug.LogError("Actor " + actor + " is not on the scene. Use EnterActorNode to place them on the scene", this.gameObject); } Finish_Node(); }