예제 #1
0
 public UntilTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     if (node.subTasks.Count == 1)
     {
         childTask = pather.CreateTaskFromNode(node.subTasks[0], this);
     }
 }
예제 #2
0
 public SeqTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     sequence = new List <Task>();
     foreach (NodeTask nt in node.subTasks)
     {
         Task t = pather.CreateTaskFromNode(nt, this);
         if (t != null)
         {
             sequence.Add(t);
         }
     }
     currentSequence = 0;
 }
예제 #3
0
 public QuestGoalTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     Name = node.GetValueOfId("Name").GetStringValue();
     ID   = node.GetValueOfId("ID").GetStringValue();
     if (ID == null || ID == "")
     {
         ID = Name;
     }
     if (node.subTasks != null && node.subTasks.Count > 0)
     {
         childTask = pather.CreateTaskFromNode(node.subTasks[0], this);
     }
 }
예제 #4
0
 public ParTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     foreach (NodeTask nt in node.subTasks)
     {
         Task t = pather.CreateTaskFromNode(nt, this);
         if (t != null)
         {
             int         prio = nt.GetPrio();
             List <Task> l;
             if (orderedChildTasks.TryGetValue(prio, out l))
             {
                 l.Add(t);
             }
             else
             {
                 l = new List <Task>();
                 l.Add(t);
                 orderedChildTasks.Add(prio, l);
             }
             //PPather.WriteLine("Par add prio " + prio + " task " + t);
         }
     }
 }
예제 #5
0
 public IfTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     childTask = pather.CreateTaskFromNode(node.subTasks[0], this);
 }