Exemple #1
0
        public AwareEntity(Vector2 pos, EntityManager em) : base(pos, em)
        {
            Hunger  = 3f;
            Fatique = 3f;

            SB            = new IdleBehaviour(this);
            CompositeGoal = new MakeDecisionGoal(this);
        }
Exemple #2
0
 //for debugging purposes
 public Goal getFrontMostSubgoal()
 {
     if (subgoalList.First.Value is CompositeGoal)
     {
         CompositeGoal firstGoal = subgoalList.First.Value as CompositeGoal;
         return(firstGoal.getFrontMostSubgoal());
     }
     else
     {
         return(subgoalList.First.Value);
     }
 }
Exemple #3
0
 public void forwardGoal(Goal passGoal)
 {
     if (subgoalList.First.Value is CompositeGoal)
     {
         CompositeGoal firstGoal = subgoalList.First.Value as CompositeGoal;
         firstGoal.forwardGoal(passGoal);
     }
     else
     {
         if (!subgoalList.First.Value.isBuffered())
         {
             subgoalList.First.Value.Terminate();
             subgoalList.First.Value.SetInactive();
             pushSubgoalFront(passGoal);
         }
     }
 }
Exemple #4
0
 protected override void myAwake()
 {
     mainGoal = new EaterThink(this);
     goalImpl = new EaterGoalImpl(this);
     health   = 50;
 }