示例#1
0
 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;
     }
 }
示例#2
0
 public override void AddNewGoal(Goal g, Agent owner)
 {
     if (!Objectives.ContainsGoal(g.Id))
     {
         Objectives.AddGoal(g, owner);
     }
     else
     {
         if (g.Concern != owner.Objectives.Content[g.Id].Concern)
         {
             owner.Objectives.Content[g.Id].Concern = g.Concern;
         }
     }
     New_Objectives.Queue   = new List <Goal>(Objectives.Queue);
     New_Objectives.Content = new Dictionary <int, Goal>(Objectives.Content);
 }