Exemple #1
0
 public void planAborted(GoapAction aborter)
 {
     // An action bailed out of the plan. State has been reset to plan again.
     // Take note of what happened and make sure if you run the same goal again
     // that it can succeed.
     Debug.Log("<color=red>Plan Aborted</color> " + GoapAgent.PrettyPrint(aborter));
 }
Exemple #2
0
    public void PlanFound(HashSet <KeyValuePair <string, object> > goal, Queue <GoapAction> action)
    {
        string s = "<color=green>Plan found</color> " + GoapAgent.PrettyPrint(action, goal);

        GameManager.instance.toDo.text = "To do: " + s;
        Debug.Log(s);
    }
Exemple #3
0
 public void PlanFailed(HashSet <KeyValuePair <string, object> > failedGoal)
 {
     foreach (KeyValuePair <string, object> kvp in failedGoal)
     {
         lastFailedGoal = kvp;
     }
     Debug.Log("<color=red>Plan failed!</color> " + GoapAgent.PrettyPrint(failedGoal));
 }
 void IGoap.PlanAborted(GoapAction aborter)
 {
     // An action bailed out of the plan. State has been reset to plan again.
     // Take note of what happened and make sure if you run the same goal again
     // that it can succeed.
     _planPreview = "aborted";
     Debug.Log($"<color=red>Plan Aborted</color> {GoapAgent.PrettyPrint(aborter)}");
 }
Exemple #5
0
 /// <summary>
 /// 计划发现
 /// </summary>
 /// <param name="goal"></param>
 /// <param name="actions"></param>
 public void PlanFound(KeyValuePair <string, bool> goal, Queue <GoapAction> actions)
 {
     // Yay we found a plan for our goal
     //我们为我们的目标找到了一个计划
     if (EnableLog)
     {
         Debug.Log("<color=green> 计划发现</color> " + GoapAgent.PrettyPrint(actions));
     }
 }
Exemple #6
0
 /// <summary>
 /// 计划中止
 /// </summary>
 /// <param name="aborter"></param>
 public void PlanAborted(GoapAction aborter)
 {
     // An action bailed out of the plan. State has been reset to plan again.
     // Take note of what happened and make sure if you run the same goal again
     // that it can succeed.
     //一项保护计划的行动。 国家已经重置计划了。
     //记下发生的事情并确保再次运行相同的目标
     //它可以成功
     if (EnableLog)
     {
         Debug.Log("<color=red>计划中止</color> " + GoapAgent.PrettyPrint(aborter));
     }
 }
Exemple #7
0
        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
            }
        }
Exemple #8
0
 public void PlanFound(HashSet <KeyValuePair <string, object> > goal, Queue <GoapAction> action)
 {
     Debug.Log("<color=green>Plan found</color> " + GoapAgent.PrettyPrint(action, goal));
 }
Exemple #9
0
 public void PlanFailed(HashSet <KeyValuePair <string, object> > failedGoal)
 {
     Debug.Log("<color=red>Plan failed!</color> " + GoapAgent.PrettyPrint(failedGoal));
 }
Exemple #10
0
 public void PlanFailed(Dictionary <string, object> failedGoal)
 {
     _actorTextOutput.Tell("Plan failed " + GoapAgent.PrettyPrint(failedGoal));
 }
Exemple #11
0
 public void planFound(HashSet <KeyValuePair <string, object> > goal, Queue <GoapAction> actions)
 {
     // Yay we found a plan for our goal
     Debug.Log("<color=green>Plan found</color> " + GoapAgent.PrettyPrint(actions));
 }
 void IGoap.PlanFound(Dictionary <string, bool> goal, Queue <GoapAction> actions)
 {
     // Yay we found a plan for our goal
     _planPreview = GoapAgent.PrettyPrint(actions);
     Debug.Log($"<color=green>Plan found</color> {_planPreview}");
 }
Exemple #13
0
 public void PlanFound(Dictionary <string, object> goal, Queue <GoapAction> actions)
 {
     // Yay we found a plan for our goal
     Debug.Log("<color=green>Plan found</color> " + GoapAgent.PrettyPrint(actions));
 }
Exemple #14
0
 public void PlanFound(Dictionary <string, object> goal, Queue <GoapAction> actions)
 {
     // Yay we found a plan for our goal
     // Console.WriteLine("<color=green>Plan found</color> " + GoapAgent.PrettyPrint(actions));
     _actorTextOutput.Tell("Plan found " + GoapAgent.PrettyPrint(actions));
 }
Exemple #15
0
 public void PlanAborted(GoapAction aborter)
 {
     Debug.Log("<color=red>Plan Aborted</color> " + GoapAgent.PrettyPrint(aborter));
 }
Exemple #16
0
 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));
 }
Exemple #17
0
 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));
 }