protected override void Awake() { myAgent = GetComponent <GoapAgent>(); myAgent.WorldStateChecks.Add(CheckWorldState); SatisfiesStates.Add(new GoapState("Has Patrol Node", true)); myGoTo = GetComponent <GoToPatrolNodeAction>(); }
public override bool CanActionRun() { if (myGoTo == null) { myGoTo = GetComponent <GoToPatrolNodeAction>(); } return(myGoTo != null); }