public AwareEntity(Vector2 pos, EntityManager em) : base(pos, em) { Hunger = 3f; Fatique = 3f; SB = new IdleBehaviour(this); CompositeGoal = new MakeDecisionGoal(this); }
//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); } }
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); } } }
protected override void myAwake() { mainGoal = new EaterThink(this); goalImpl = new EaterGoalImpl(this); health = 50; }