Example #1
0
        public void PlanFailed(HashSet <KeyValuePair <string, object> > goals)
        {
            string str = "<color=red>Plan failed</color>\n";

            str += "[ " + GoapAgent.PrettyGoals(goals) + " ]";
            Debug.Log(str);
        }
Example #2
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);
        }