Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    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();
    }
Exemplo n.º 3
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;
     }
 }