Beispiel #1
0
 //计划完成了当前动作
 private void PlanActionComplete(TAction actionLabel)
 {
     DebugMsg.Log("下一步");
     if (_planHandler.GetCurrentHandler().Label.ToString() == actionLabel.ToString())
     {
         _planHandler.NextAction();
     }
 }
Beispiel #2
0
 public Performer(IAgent <TAction, TGoal> agent)
 {
     planHandler = new PlanHandler <TAction>();
     planHandler.AddCompleteCallBack(() =>
     {
         //计划完成
         DebugMsg.Log("计划完成");
         actionManager.IsPerformAction = false;
     });
     planner       = new Planner <TAction, TGoal>(agent);
     goalManager   = agent.GoalManager;
     actionManager = agent.ActionManager;
     actionManager.AddActionCompleteListener((actionLabel) =>
     {
         //计划完成了当前动作
         DebugMsg.Log("下一步");
         if (planHandler.GetCurrentHandler().Label.ToString() == actionLabel.ToString())
         {
             planHandler.HandlerAction();
         }
     });
 }