/// <summary>
 /// Moves to the next slide in the dialogue tree
 /// depending on the player's choice (parameter).
 /// </summary>
 /// <param name="playerChoice"></param>
 public void DialogueForward(string playerChoice)
 {
     if (currentSlide.GetNextSlide(playerChoice) != null)
     {
         this.currentSlide = this.currentSlide.GetNextSlide(playerChoice);
     }
 }
Пример #2
0
 //This method sets the connections between slides, which is essential in creation of a dialogue tree.
 public void SetNextSlide(DialogueSlide optionTop, DialogueSlide optionHigh, DialogueSlide optionLow, DialogueSlide optionBottom)
 {
     this.optionTop    = optionTop;
     this.optionHigh   = optionHigh;
     this.optionLow    = optionLow;
     this.optionBottom = optionBottom;
 }
Пример #3
0
 public void RemoveSlideConnection(int optionRank)
 {
     if (optionRank == 1)
     {
         this.optionTop = null;
     }
     else if (optionRank == 2)
     {
         this.optionHigh = null;
     }
     else if (optionRank == 3)
     {
         this.optionLow = null;
     }
     else
     {
         this.optionBottom = null;
     }
 }
Пример #4
0
 public void AddSlideConnection(DialogueSlide newConnection, int optionRank)
 {
     if (optionRank == 1)
     {
         this.optionTop = newConnection;
     }
     else if (optionRank == 2)
     {
         this.optionHigh = newConnection;
     }
     else if (optionRank == 3)
     {
         this.optionLow = newConnection;
     }
     else
     {
         this.optionBottom = newConnection;
     }
 }
 /// <summary>
 /// Constructor is used to build the dialoguetree,
 /// and set the current location to the 1st slide.
 /// Not-yet-implemented: Takes the index number of the dialogue to build as a parameter.
 /// </summary>
 public DialogueController()
 {
     this.dialogueTree = new DialogueBuilder();
     dialogueTree.BuildDialogue2();
     this.currentSlide = dialogueTree.CurrentSlide(0);
 }
 public int GetSlideIndex(DialogueSlide currentSlide)
 {
     return(slides.IndexOf(currentSlide));
 }