protected override EBTStatus update(Agent pAgent, EBTStatus childStatus) { ReferencedBehavior node = base.GetNode() as ReferencedBehavior; if (node != null) { string name = pAgent.btgetcurrent().GetName(); string btMsg = string.Format("{0}[{1}] {2}", name, node.GetId(), node.m_referencedBehaviorPath); LogManager.Log(pAgent, btMsg, EActionResult.EAR_none, LogMode.ELM_jump); pAgent.btreferencetree(node.m_referencedBehaviorPath); } return(EBTStatus.BT_RUNNING); }
protected override EBTStatus update(Agent pAgent, EBTStatus childStatus) { Debug.Check(m_returnStatus == EBTStatus.BT_INVALID); ReferencedBehavior pNode = this.GetNode() as ReferencedBehavior; if (pNode != null) { string pThisTree = pAgent.btgetcurrent().GetName(); string msg = string.Format("{0}[{1}] {2}", pThisTree, pNode.GetId(), pNode.m_referencedBehaviorPath); LogManager.Log(pAgent, msg, EActionResult.EAR_none, LogMode.ELM_jump); pAgent.btreferencetree(pNode.m_referencedBehaviorPath); } return(EBTStatus.BT_RUNNING); }