Beispiel #1
0
 /// <summary>
 /// 获取通用提示框并展示option中内容
 /// </summary>
 /// <param name="option"></param>
 public void ShowDialog(UICustomeDialogueOption option)
 {
     if (_dialogueInstance == null || UIController.IsDestroyed(_dialogueInstance))
     {
         UIHierarchyHelper.Instance.LoadAndPlaceAsync(go =>
         {
             _dialogueInstance = go.GetComponent <UICustomDialogue>();
             dialogueInstanceFunc(option);
         }, dialoguePrefabPath, UIHierarchyHelper.eUIType.None, null, true);
     }
     else
     {
         dialogueInstanceFunc(option);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 获取通用提示框
 /// </summary>
 /// <returns></returns>
 public void GetDialog(string type, string body, OnUIDialogueButtonClick callBack)
 {
     if (_dialogueInstance == null || UIController.IsDestroyed(_dialogueInstance))
     {
         UIHierarchyHelper.Instance.LoadAndPlaceAsync(go =>
         {
             _dialogueInstance = go.GetComponent <UICustomDialogue>();
             dialogueInstanceFunc(type, body, callBack);
         }, dialoguePrefabPath, UIHierarchyHelper.eUIType.None, null, true);
     }
     else
     {
         dialogueInstanceFunc(type, body, callBack);
     }
 }