private int GetFrames(Agent pAgent) { Debug.Check(this.GetNode() is WaitFramesState); WaitFramesState pWaitNode = (WaitFramesState)(this.GetNode()); return(pWaitNode != null?pWaitNode.GetFrames(pAgent) : 0); }
protected override EBTStatus update(Agent pAgent, EBTStatus childStatus) { Debug.Check(childStatus == EBTStatus.BT_RUNNING); Debug.Check(this.m_node is WaitFramesState, "node is not an WaitFramesState"); WaitFramesState pStateNode = (WaitFramesState)this.m_node; if (Workspace.Instance.FrameSinceStartup - this.m_start + 1 >= this.m_frames) { pStateNode.Update(pAgent, out this.m_nextStateId); return(EBTStatus.BT_SUCCESS); } return(EBTStatus.BT_RUNNING); }