Ejemplo n.º 1
0
 public UntilTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     if (node.subTasks.Count == 1)
     {
         childTask = pather.CreateTaskFromNode(node.subTasks[0], this);
     }
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 5
0
 public IfTask(PPather pather, NodeTask node)
     : base(pather, node)
 {
     childTask = pather.CreateTaskFromNode(node.subTasks[0], this);
 }