コード例 #1
0
ファイル: WaitframesState.cs プロジェクト: P79N6A/behaviac3.6
            private int GetFrames(Agent pAgent)
            {
                Debug.Check(this.GetNode() is WaitFramesState);
                WaitFramesState pWaitNode = (WaitFramesState)(this.GetNode());

                return(pWaitNode != null?pWaitNode.GetFrames(pAgent) : 0);
            }
コード例 #2
0
ファイル: WaitframesState.cs プロジェクト: P79N6A/behaviac3.6
            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);
            }