public override void Run(IReGoapAction <string, object> previous, IReGoapAction <string, object> next, ReGoapState <string, object> settings, ReGoapState <string, object> goalState, Action <IReGoapAction <string, object> > done, Action <IReGoapAction <string, object> > fail) { base.Run(previous, next, settings, goalState, done, fail); if (settings.HasKey("ObjectivePosition")) { smsGoto.GoTo((Vector3)settings.Get("ObjectivePosition"), OnDoneMovement, OnFailureMovement); } else { failCallback(this); } }
public override void Run(IReGoapAction previous, IReGoapAction next, IReGoapActionSettings settings, ReGoapState goalState, Action <IReGoapAction> done, Action <IReGoapAction> fail) { base.Run(previous, next, settings, goalState, done, fail); SetObjective(settings); if (objectivePosition != default(Vector3)) { smsGoto.GoTo(objectivePosition, OnDoneMovement, OnFailureMovement); } else { failCallback(this); } }
public override void Run(IReGoapAction <string, object> previous, IReGoapAction <string, object> next, IReGoapActionSettings <string, object> settings, ReGoapState <string, object> goalState, Action <IReGoapAction <string, object> > done, Action <IReGoapAction <string, object> > fail) { base.Run(previous, next, settings, goalState, done, fail); var localSettings = (GenericGoToSettings)settings; if (localSettings.ObjectivePosition.HasValue) { smsGoto.GoTo(localSettings.ObjectivePosition, OnDoneMovement, OnFailureMovement); } else { failCallback(this); } }
public override void Run(IReGoapActionSettings settings, Action <ReGoapAction> done, Action <ReGoapAction> fail) { base.Run(settings, done, fail); GenericGoToSettings localSettings = (GenericGoToSettings)settings; if (localSettings.ObjectivePosition.HasValue) { smsGoto.GoTo(localSettings.ObjectivePosition, OnDoneMovement, OnFailureMovement); } else { failCallback(this); } }