示例#1
0
        public override Status Execute()
        {
            if (lastResult != Status.Running)
            {
                node.Reset();
            }
            var ret = lastResult = node.Execute();

            return(ret != Status.Running ? Status.Success : Status.Running);
        }
示例#2
0
        public override Status Execute()
        {
            if (lastResult != Status.Running)
            {
                node.Reset();
            }
            var ret = lastResult = node.Execute();

            if (ret == Status.Failure)
            {
                ret = Status.Success;
            }
            else if (ret == Status.Success)
            {
                ret = Status.Failure;
            }

            return(ret);
        }