示例#1
0
        public override BhvStatus DecorateResult(BhvStatus s)
        {
            if (s == BhvStatus.FAILURE)
            {
                return(s);
            }

            return(BhvStatus.RUNNING);
        }
示例#2
0
        public override BhvStatus DecorateResult(BhvStatus s)
        {
            BhvStatus result;

            switch (s)
            {
            case BhvStatus.FAILURE:
                result = BhvStatus.SUCCESS;
                break;

            case BhvStatus.SUCCESS:
                result = BhvStatus.FAILURE;
                break;

            default:
                result = BhvStatus.RUNNING;
                break;
            }

            return(result);
        }
示例#3
0
 /// <summary>
 /// Set the status of the active behavior branch
 /// </summary>
 public void SetStatus(BhvStatus s)
 {
     Status = s;
 }
示例#4
0
 public virtual BhvStatus DecorateResult(BhvStatus s)
 {
     return(s);
     // Override with unique implementation in derived classes
 }