Example #1
0
 public void UpdateWorkStation(WorkComponent station)
 {
     if (station != null)
     {
         _myWorkStation = station;
     }
 }
Example #2
0
         /// <summary>
         /// Current action is finished. We are no longer using the workstation.
         /// </summary>
         /// <param name="currentAction"></param>
        public void CurrentActionFinished(GoapAction currentAction)
        {
            if (_myWorkStation == null) return;

            _myWorkStation.StoptWorking(this);
            _myWorkStation = null; // reset work station
        }
Example #3
0
        /// <summary>
        /// An action bailed out of the plan. State has been reset to plan again.
        /// Take note of what happened and make sure if you run the same goal again
        /// that it can succeed.
        /// </summary>
        /// <param name="aborter"></param>
        public void PlanAborted(GoapAction aborter)
        {
            //Debug.Log("<color=red>Plan Aborted</color> " + GoapAgent.PrettyPrint(aborter));
            _agent.AbortPlan();
            if (_myWorkStation == null) return;

            _myWorkStation.StoptWorking(this);
            _myWorkStation = null; // reset work station
        }