//======================================== // Self-Define //------------------------------ //---------------------- // Public Functions /// <summary> /// Hide the last open dialogue in the current scene. /// </summary> public void HideTheLastOpenDialogue() { // return if nothing in the list if (GetOpenWindow().Count == 0) { return; } JCS_DialogueObject jdo = GetOpenWindow().Last.Value; // once it hide it will remove from the list it self! jdo.HideDialogue(); }
/// <summary> /// Do action according to the panel action type. /// </summary> /// <param name="panel"> panel to set </param> /// <param name="type"> action type </param> private void DoActionForeachPanel(JCS_DialogueObject panel, JCS_PanelActionType type) { // check null references... if (panel == null) { return; } switch (type) { case JCS_PanelActionType.HIDE: { if (mPlayPanelSound) { panel.HideDialogue(); } else { panel.HideDialogueWithoutSound(); } } break; case JCS_PanelActionType.SHOW: { if (mPlayPanelSound) { panel.ShowDialogue(); } else { panel.ShowDialogueWithoutSound(); } } break; } }