コード例 #1
0
 public string GetDialogue(MissionNPC npc, Stage stage)
 {
     try
     {
         XmlDocument xdoc = new XmlDocument();
         xdoc.Load(filepath);
         string key = parseKey(npc.GetName(), npc.GetMissionType(), stage);
         if (xdoc.SelectSingleNode(key) == null)
         {
             return "Can't find dialogue for key:\n     "+key;
         }
         return xdoc.SelectSingleNode(key).InnerText;
     }
     catch (FileNotFoundException e)
     {
         UI.Notify(e.Message);
         UI.ShowSubtitle(e.StackTrace + "\n" + e.Message, 7000);
     }
     catch (Exception e)
     {
         UI.Notify(e.Message);
         UI.ShowSubtitle(e.StackTrace+"\n"+ e.Message, 7000);
     }
     return "Can't find key";
 }
コード例 #2
0
 public void Reload(MissionNPC qm)
 {
     missionNpc = qm;
     missionNpc.Interact();
     lName.Caption = missionNpc.GetName();
     lMission.Caption = getStartDialogue();
     acceptButton.SetVisible(true);
     declineButton.SetVisible(true);
     isEnabled = true;
 }