Esempio n. 1
0
 public override IReGoapActionSettings GetSettings(ReGoapState goalState)
 {
     settings = new GenericGoToSettings
     {
         ObjectivePosition = GetWantedPositionFromState(goalState)
     };
     return(base.GetSettings(goalState));
 }
Esempio n. 2
0
 public override IReGoapActionSettings <string, object> GetSettings(IReGoapAgent <string, object> goapAgent, ReGoapState <string, object> goalState)
 {
     settings = new GenericGoToSettings
     {
         ObjectivePosition = GetWantedPositionFromState(goalState)
     };
     return(base.GetSettings(goapAgent, goalState));
 }
Esempio n. 3
0
        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);
            }
        }