예제 #1
0
        public void PlanFound(HashSet <KeyValuePair <string, object> > goals, Stack <GoapAction> plan)
        {
            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);
        }