public void FirstGoalIsOver() { //remove de tout les goals Goal g = this.Objectives.Queue[0]; if (New_Objectives.ContainsGoal(g.Id)) { New_Objectives.RemoveGoal(g); } Objectives.Queue[0].Concern = BaseEntity.Class_T.NOBODY; New_Objectives.AddGoal(Objectives.Queue[0], this); Objectives.SortByPriority(this); }
public void GetNewInformationFrom(Merchant sender) { Objectives.Reset(); foreach (Goal g in sender.Objectives.Queue) { Goal g_tmp = new Goal(g, this); g_tmp.Owner = this; AddNewGoal(g_tmp, this); } Objectives.UpdateOwner(this); Objectives.SortByPriority(this); New_Objectives.Reset(); }
virtual public void AddNewGoal(Goal g, Agent owner) { if (!Objectives.ContainsGoal(g.Id)) { New_Objectives.AddGoal(g, this); Objectives.AddGoal(g, this); } else { if (g.Concern != owner.Objectives.Content[g.Id].Concern) { Objectives.Content[g.Id].Concern = g.Concern; } Objectives.Content[g.Id].Owner = this; } }