private void radBelowValue_CheckedChanged(object sender, EventArgs e)
 {
     if (radBelowValue.Checked)
     {
         type = GoalTypes.StayBelow;
     }
 }
 private void radReachValue_CheckedChanged(object sender, EventArgs e)
 {
     if (radReachValue.Checked)
     {
         type = GoalTypes.ReachValue;
     }
 }
 private void radAboveValue_CheckedChanged(object sender, EventArgs e)
 {
     if (radAboveValue.Checked)
     {
         type = GoalTypes.StayAbove;
     }
 }
Example #4
0
 ///<summary>
 ///Base goal constructor
 ///</summary>
 ///<param name="bot"></param>
 ///<param name="goalType"></param>
 protected Goal(BotEntity bot, GoalTypes goalType)
 {
     _bot = bot;
     _goalType = goalType;
     _status = StatusTypes.Inactive;
     _logPrefixText = String.Format("[{0,-8}] [{1,17}.", Bot.Name, goalType);
 }
Example #5
0
 public Goal(string name, GoalTypes type, DecompositionTypes decomposition, List <Goal> goalConstraints, List <WorldContext> contextConstraints)
 {
     Name               = name;
     Type               = type;
     Decomposition      = decomposition;
     GoalConstraints    = goalConstraints;
     ContextConstraints = contextConstraints;
 }
 protected Goal(Agent agent, GoalTypes goalType)
 {
     Agent    = agent;
     GoalType = goalType;
     Status   = StatusTypes.Inactive;
 }
Example #7
0
 public bool NotPresent(GoalTypes goalType)
 {
     return(Subgoals.Count <= 0 || Subgoals.Peek().GoalType != goalType);
 }
Example #8
0
 ///<summary>
 ///returns true if the given goal is not the front subgoal
 ///</summary>
 ///<param name="goalType"></param>
 ///<returns></returns>
 public bool NotPresent(GoalTypes goalType)
 {
     return Subgoals.Count <= 0 || Subgoals.Peek().GoalType != goalType;
 }
Example #9
0
 ///<summary>
 ///Base class for composite goals
 ///</summary>
 ///<param name="bot">Bot that owns this goal</param>
 ///<param name="goalType">The type of this goal</param>
 protected CompositeGoal(BotEntity bot, GoalTypes goalType)
     : base(bot, goalType)
 {
     _subgoals = new Stack<Goal>();
 }
 protected CompositeGoal(Agent agent, GoalTypes goalType)
     : base(agent, goalType)
 {
     Subgoals = new List <Goal>();
 }
Example #11
0
 public MissionGoal(GoalTypes goalType, Unit.Type typeRestriction)
 {
     this.goalType        = goalType;
     this.typeRestriction = typeRestriction;
 }
Example #12
0
 public MissionGoal(GoalTypes goalType, int amountRestriction)
 {
     this.goalType          = goalType;
     this.amountRestriction = amountRestriction;
 }