Exemplo n.º 1
0
 /// <summary>
 /// Executes this node on the specified dialogue state.
 /// </summary>
 public override void PerformNode(DialoguePlayer state)
 {
     if (state.EvaluateCondition(Text))
     {
         state.MoveToNode(BranchTrueNext);
     }
     else
     {
         state.MoveToNode(BranchFalseNext);
     }
 }
 /// <summary>
 /// Executes this node on the specified dialogue state.
 /// </summary>
 public override void PerformNode(DialoguePlayer state)
 {
     if (state.RandomFloat() < Chance1)
     {
         state.MoveToNode(Branch1);
     }
     else
     {
         state.MoveToNode(Branch2);
     }
 }
        /// <summary>
        /// Performs a user choice on this node, moving to the appropriate next node.
        /// </summary>
        public override void PerformChoice(DialoguePlayer state, int choice)
        {
            if (choice < 0 || choice >= Choices.Length)
            {
                throw new ArgumentOutOfRangeException("choice");
            }
            Choice choiceData = Choices[choice];

            state.MoveToNode(choiceData.Next);
        }
 /// <summary>
 /// Executes this node on the specified dialogue state.
 /// </summary>
 public override void PerformNode(DialoguePlayer state)
 {
     state.MoveToNode(Next);
 }
 /// <summary>
 /// Performs a user choice on this node, moving to the appropriate next node.
 /// </summary>
 public override void PerformChoice(DialoguePlayer state, int choice)
 {
     state.MoveToNode(Next);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Executes this node on the specified dialogue state.
        /// </summary>
        public override void PerformNode(DialoguePlayer state)
        {
            int randomIndex = state.RandomInt(Branches.Length);

            state.MoveToNode(Branches[randomIndex]);
        }