Example #1
0
 protected override bool TestRunInt(Slate slate)
 {
     if (node == null || elseNode == null)
     {
         return(true);
     }
     if (node.TestRun(slate.DeepCopy()))
     {
         node.TestRun(slate);
         return(true);
     }
     if (elseNode.TestRun(slate.DeepCopy()))
     {
         elseNode.TestRun(slate);
         return(true);
     }
     return(false);
 }
 private IEnumerable <QuestNode> GetNodesCanRun(Slate slate)
 {
     for (int i = 0; i < nodes.Count; i++)
     {
         if (nodes[i].SelectionWeight(slate) > 0f && nodes[i].TestRun(slate.DeepCopy()))
         {
             yield return(nodes[i]);
         }
     }
 }