protected override EBTStatus update(Agent pAgent, EBTStatus childStatus) { EBTStatus status = childStatus; if (childStatus == EBTStatus.BT_RUNNING) { Debug.Check(this.GetNode() is Task, "node is not an Method"); Task pTaskNode = (Task)(this.GetNode()); if (pTaskNode.IsHTN) { #if BEHAVIAC_USE_HTN status = _planner.Update(); #endif// } else { Debug.Check(this.m_children.Count == 1); BehaviorTask c = this.m_children[0]; status = c.exec(pAgent); } } else { Debug.Check(true); } return(status); }
protected override EBTStatus update(Agent pAgent, EBTStatus childStatus) { Debug.Check(this.GetNode() is Task, "node is not an Method"); Task pTaskNode = (Task)(this.GetNode()); if (pTaskNode.IsHTN) { EBTStatus status = _planner.Update(); return(status); } else { Debug.Check(this.m_children.Count == 1); BehaviorTask c = this.m_children[0]; EBTStatus status = c.exec(pAgent); return(status); } }