Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement