Esempio n. 1
0
 public static DialogueGod ReadFile(string sPath)
 {
     DialogueGod ret;
     try
     {
         using (FileStream readStream = new FileStream(sPath, FileMode.Open, FileAccess.Read))
         {
             using (BinaryReader br = new BinaryReader(readStream))
             {
                 br.ReadInt32();
                 ret = DialogueGod.Read(br);
                 br.Close();
             }
         }
     }
     catch
     {
         ret = new DialogueGod();
     }
     return ret;
 }
Esempio n. 2
0
 public static DialogueGod Read(BinaryReader br)
 {
     DialogueGod.iLoadedIteration = br.ReadInt32();
     DialogueGod ret = new DialogueGod();
     if (DialogueGod.iLoadedIteration > DialogueGod.iCurrentIteration)
     {
         return ret;
     }
     if (DialogueGod.iLoadedIteration >= 1)
     {
         ret.sVersion = br.ReadString();
     }
     ret.sLanguage = br.ReadString();
     int iCount = br.ReadInt32();
     for (int i = 0; i < iCount; i++)
     {
         string sKey = br.ReadString();
         ret.dsxDialogueCollections[sKey] = DialogueCollection.Read(br);
     }
     return ret;
 }