Beispiel #1
0
 public static DialogueLine Read(BinaryReader br)
 {
     DialogueLine ret = new DialogueLine();
     ret.sSpeaker = br.ReadString();
     ret.sMood = br.ReadString();
     ret.sUnparsedBaseLine = br.ReadString();
     ret.sUnparsedFullLine = br.ReadString();
     ret.sNotes = br.ReadString();
     int iCount = br.ReadInt32();
     for (int i = 0; i < iCount; i++)
     {
         ret.lsPreScripts.Add(br.ReadString());
     }
     iCount = br.ReadInt32();
     for (int j = 0; j < iCount; j++)
     {
         ret.lsOnScripts.Add(br.ReadString());
     }
     iCount = br.ReadInt32();
     for (int k = 0; k < iCount; k++)
     {
         ret.lsPostScripts.Add(br.ReadString());
     }
     iCount = br.ReadInt32();
     for (int l = 0; l < iCount; l++)
     {
         ret.lxConditionals.Add(ConditionalPart.Read(br));
     }
     return ret;
 }
Beispiel #2
0
 public DialogueLine Copy()
 {
     DialogueLine ret = new DialogueLine();
     ret.sSpeaker = this.sSpeaker;
     ret.sMood = this.sMood;
     ret.sUnparsedBaseLine = this.sUnparsedBaseLine;
     ret.sUnparsedFullLine = this.sUnparsedFullLine;
     ret.sNotes = this.sNotes;
     for (int i = 0; i < this.lsPreScripts.Count; i++)
     {
         ret.lsPreScripts.Add(this.lsPreScripts[i]);
     }
     for (int j = 0; j < this.lsOnScripts.Count; j++)
     {
         ret.lsOnScripts.Add(this.lsOnScripts[j]);
     }
     for (int k = 0; k < this.lsPostScripts.Count; k++)
     {
         ret.lsPostScripts.Add(this.lsPostScripts[k]);
     }
     for (int l = 0; l < this.lxConditionals.Count; l++)
     {
         ret.lxConditionals.Add(this.lxConditionals[l].Copy());
     }
     return ret;
 }
Beispiel #3
0
 public void ProgressDialogue()
 {
     if (this.iSkipDelayGuard > 0)
     {
         return;
     }
     if (this.xPopUpRenderComponent != null)
     {
         this.xPopUpRenderComponent.Close();
         return;
     }
     this.bCantSkipCurrentLine = false;
     this.xPopUpRenderComponent = null;
     Dialogue xCur = this.xCurrentDialogue;
     if (this.iDialogueProgress >= 0 && this.xCurrentLine.lsPostScripts != null)
     {
         foreach (string s in this.xCurrentLine.lsPostScripts)
         {
             Program.GetTheGame()._Dialogue_ParseEvent(s);
         }
     }
     if (this.xCurrentDialogue != xCur)
     {
         return;
     }
     this.iDialogueProgress++;
     this.bCurrentLineOnEnd = false;
     if (this.iDialogueProgress < this.xCurrentDialogue.lxDialogueLines.Count)
     {
         this.xCurrentLine = this.xCurrentDialogue.lxDialogueLines[this.iDialogueProgress];
         if (this.xCurrentLine.sSpeaker != "None")
         {
             this.xLineDisplay.SetNewLine(this.xCurrentLine.sUnparsedFullLine, DialogueSystem.fontText);
         }
         else
         {
             this.xLineDisplay.SetNewLineNoSpeaker(this.xCurrentLine.sUnparsedFullLine, DialogueSystem.fontText);
         }
         if (this.xCurrentLine.lsPreScripts != null)
         {
             foreach (string s2 in this.xCurrentLine.lsPreScripts)
             {
                 Program.GetTheGame()._Dialogue_ParseEvent(s2);
             }
         }
         this.xCharData = DialogueCharacterLoading.GetCharacterData(this.xCurrentLine.sSpeaker);
         this.sPortrait = this.xCurrentLine.sMood;
         return;
     }
     this.EndDialogue();
 }