Beispiel #1
0
 public void StopCurrentStory()
 {
     try
     {
         UnityEngine.GameObject obj = UIManager.Instance.GetWindowGoByName("StoryDlgSmall");
         if (null != obj)
         {
             StoryDlgPanel dlg = obj.GetComponent <StoryDlgPanel>();
             if (dlg != null)
             {
                 dlg.KillStoryDlg();
             }
         }
         UnityEngine.GameObject objB = UIManager.Instance.GetWindowGoByName("StoryDlgBig");
         if (null != objB)
         {
             StoryDlgPanel dlg = objB.GetComponent <StoryDlgPanel>();
             if (dlg != null)
             {
                 dlg.KillStoryDlg();
             }
         }
     }
     catch (System.Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogErrorFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
Beispiel #2
0
 /// Story Handlers
 public void TriggerStory(int storyId)
 {
     try
     {
         StoryDlg.StoryDlgInfo storyInfo = StoryDlg.StoryDlgManager.Instance.GetStoryInfoByID(storyId);
         if (null != storyInfo)
         {
             if (storyInfo.DlgType == StoryDlgPanel.StoryDlgType.Small)
             {
                 UIManager.Instance.ShowWindowByName("StoryDlgSmall");
                 UnityEngine.GameObject obj = UIManager.Instance.GetWindowGoByName("StoryDlgSmall");
                 if (null != obj)
                 {
                     StoryDlgPanel dlg = obj.GetComponent <StoryDlgPanel>();
                     dlg.OnTriggerStory(storyInfo);
                 }
             }
             else
             {
                 UnityEngine.GameObject obj = UIManager.Instance.GetWindowGoByName("StoryDlgBig");
                 if (null != obj)
                 {
                     StoryDlgPanel dlg = obj.GetComponent <StoryDlgPanel>();
                     dlg.OnTriggerStory(storyInfo);
                 }
             }
         }
         else
         {
             Debug.LogError("Wrong Story id = " + storyId);
         }
     }
     catch (System.Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogErrorFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }