public override NodeState Evaluate()
        {
            switch (child.Evaluate())
            {
            case NodeState.Failure:
            case NodeState.Running:
                State = NodeState.Running;
                break;

            case NodeState.Success:
                State = NodeState.Success;
                return(State);
            }
            return(State);
        }
示例#2
0
        public override NodeState Evaluate()
        {
            switch (terminalCondition())
            {
            case NodeState.Failure:
            case NodeState.Running:
                child.Evaluate();
                State = NodeState.Running;
                return(State);

            case NodeState.Success:
                State = NodeState.Success;
                return(State);
            }
            return(State);
        }