private void OnTriggerExit(Collider col) { var agent = col.GetComponentInParent <Agent>(); foreach (var effect in OnExit) { var states = effect.Space == Space.Self ? agent.States : World.Instance.States; GOAPUtils.SetState(effect, states); } }
/// <summary> /// Return true if the action has all the requirements to start. This happens after IsAchieveable(). /// </summary> public bool IsPreconditionsMet(Dictionary <string, float> preConditions) => GOAPUtils.IsStateMatch(PreConditions, preConditions);
public void Set(ActionEffect effect) { var states = effect.Space == Space.Self ? effect.Action.States : World.Instance.States; GOAPUtils.SetState(effect, states); }