コード例 #1
0
        public override StatusTypes Process()
        {
            ActivateIfInactive();

            var subgoalStatus = ProcessSubgoals();

            if (subgoalStatus != StatusTypes.Completed && subgoalStatus != StatusTypes.Failed)
            {
                return(Status);
            }
            Status            = StatusTypes.Inactive;
            _bestDesirability = 0.0f;

            if (!Subgoals.IsEmpty())
            {
                Subgoals.Peek().Terminate();
            }

            return(Status);
        }
コード例 #2
0
 public bool NotPresent(GoalTypes goalType)
 {
     return(Subgoals.Count <= 0 || Subgoals.Peek().GoalType != goalType);
 }