/// <summary> /// fade out the designated prefab canvas /// this ends the viewing state, /// use TransitionOutFullArt instead for transitioning to next /// </summary> public void HideFullArt( Script_FullArt fullArt, FadeSpeeds fadeOutSpeed, Action cb ) { Debug.Log("HideFullArt() called"); // fade out global bg Script_FullArtBgCanvasGroup bg = bgs[(int)fullArt.bg]; bg.FadeOut(fadeOutSpeed, () => bg.gameObject.SetActive(false)); fullArt.FadeOut(fadeOutSpeed, () => { fullArtCanvasGroup.alpha = 0f; fullArtCanvasGroup.gameObject.SetActive(false); if (Script_Game.Game.GetPlayer().State == Const_States_Player.Viewing) { Script_Game.Game.GetPlayer().SetIsInteract(); } activeFullArt = null; if (cb != null) { cb(); } }); }
public void TransitionOutFullArt( Script_FullArt fullArt, FadeSpeeds fadeOutSpeed, Action cb ) { fullArt.FadeOut(fadeOutSpeed, () => { if (cb != null) { cb(); } }); }