SHARE
TWEET

Untitled

a guest Jul 16th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private static void TestDialogue()
  2.         {
  3.             var dialogue = GameDialogue.DialogueList;
  4.  
  5.             for (var i = 0; i < dialogue.Count; i++)
  6.             {
  7.                 var current = dialogue[i];
  8.  
  9.                 var ouputs = current.OutputIds;
  10.                 var currentOutputCount = current.OutputIds.Count;
  11.  
  12.                 for (var j = 0; j < ouputs.Count; j++)
  13.                 {
  14.                     var nextConnection = GameDialogue.ConnectionList.FirstOrDefault(c => c.Source.PinRef == ouputs[j]);
  15.                     if (nextConnection == null) continue;
  16.  
  17.                     var nextDialogue = dialogue.FirstOrDefault(d => d.Id == nextConnection.Target.IdRef);
  18.                     var nextOutputCount = nextDialogue.OutputIds.Count;
  19.  
  20.                     if (nextOutputCount == currentOutputCount)
  21.                     {
  22.                       //Insert breakpoint here
  23.                         var problemDialogue = current.DisplayText;
  24.                         var problemRetort = nextDialogue.DisplayText;
  25.                     }
  26.                 }
  27.             }
  28.         }
  29.  
  30.         private static void ExportDialogue()
  31.         {
  32.             const string fileName = "dialogue-output.xml";
  33.             FlatRedBall.IO.FileManager.XmlSerialize(GameDialogue, fileName);
  34.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top