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