示例#1
0
 public virtual void PlanFailed(HashSet <KeyValuePair <string, object> > goals)
 {
     if (ShowPlanState)
     {
         string str = "<color=red>Plan failed</color>\n";
         str += "[ " + GoapAgent.PrettyGoals(goals) + " ]";
         Debug.Log(str);
     }
 }
示例#2
0
        public virtual void PlanFound(HashSet <KeyValuePair <string, object> > goals, Stack <GoapAction> plan)
        {
            if (ShowPlanState)
            {
                int cost = 0;
                foreach (var action in plan)
                {
                    cost += action.Cost;
                }

                string str = "<color=green>Plan found</color>\n";
                str += "[ " + GoapAgent.PrettyPlan(plan) + " ]";
                str += " --> [ " + GoapAgent.PrettyGoals(goals) + " ]\n";
                str += "cost: " + cost.ToString();
                Debug.Log(str);
            }
        }