Exemplo n.º 1
0
    bool ReplanCurrentGoal()
    {
        if (CurrentGoal == null)
        {
            return(false);
        }

        CurrentGoal.ReplanReset();

        GOAPPlan plan = BuildPlan(CurrentGoal);

        if (plan == null)
        {
            //if (Owner.debugGOAP) Debug.Log(Time.timeSinceLevelLoad + " " + CurrentGoal.ToString() + " - REPLAN failed");
            return(false);
        }

        CurrentGoal.Activate(plan);

        return(true);
    }