Exemplo n.º 1
0
 public override IReGoapActionSettings GetSettings(ReGoapState goalState)
 {
     settings = new GenericGoToSettings
     {
         ObjectivePosition = GetWantedPositionFromState(goalState)
     };
     return(base.GetSettings(goalState));
 }
Exemplo 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));
 }
Exemplo 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);
            }
        }