protected override bool Exit(GoapAgent agent) { _bar.SetValue(0); agent.AddActionData("targetFood", DestTarget); return(true); }
public override bool CheckProceduralPrecondition(GoapAgent agent) { var herb = FindObjectOfType <Herb>(); if (herb == null) { Debug.Log("farmer: cant find herb"); return(false); } Target = herb.gameObject; agent.AddActionData("targetHerb", Target); return(true); }
protected override bool Exit(GoapAgent agent) { agent.AddActionData("targetFood", DestTarget); return(base.Exit(agent)); }