public override void PlanFailed(WorldGoal failedGoal) { // Not handling this here since we are making sure our goals will always // succeed. // TODO: Make sure the world state has changed before running the same // goal again. // TODO: Support multiple goals and select the next one. }
public override void PlanFailed(WorldGoal failedGoal) { // If this happens for too long, there is probably a bug in the actions, // goals or world setup. // TODO: Make sure the world state has changed before running the same // goal again. // TODO: Support multiple goals and select the next one. textBubble.SetText("..."); }
protected WorldGoal[] GoalsToWorldGoal(Goal[] goals) { WorldGoal[] worldGoals = new WorldGoal[goals.Length]; for (int i = 0; i < goals.Length; i++) { WorldGoal worldGoal = new WorldGoal(); worldGoal[this] = goals[i]; worldGoals[i] = worldGoal; } return(worldGoals); }
public override void PlanFailed(WorldGoal failedGoal) { // If this happens for too long, there is probably a bug in the actions, // goals or world setup. // TODO: Make sure the world state has changed before running the same // goal again. // TODO: Support multiple goals and select the next one. toughtBubble.SetActionText("..."); // Debug messages are called in the planner // Allow switching between multiple goals goalIndex = (goalIndex + 1) % worldGoals.Length; }
public override void PlanFound(WorldGoal goal, Queue <ITransition> actions) { // Yay we found a plan for our goal! Debug.Log("<color=green>Plan found</color> " + GoapAgent.PrettyPrint(actions)); // Once a plan was found we can come back to the main goal if (actions.Count > 0) { goalIndex = 0; } else { goalIndex++; // Avoid repeating the main goal once it's solved } }
public override void PlanFound(WorldGoal goal, Queue <ITransition> actions) { // Yay we found a plan for our goal! Debug.Log("<color=green>Plan found</color> " + GoapAgent.PrettyPrint(actions)); }
public override void PlanFound(WorldGoal goal, Queue <GoapAction.WithContext> actions) { // Yay we found a plan for our goal Debug.Log("ok..."); Debug.Log("<color=green>Plan found</color> " + GoapAgent.PrettyPrint(actions)); }