public void Init() { agent = GetComponent <UnityEngine.AI.NavMeshAgent>(); intelligentAgent = GetComponent <ArtificialIntelligence.IntelligentAgent>(); cachedTransform = transform; }
private void Awake() { agent = GetComponent <IntelligentAgent>(); currentAction = ActionTypes.WAIT; changeHiddingPlaceAction = new ArtificialIntelligence.ChangeHiddingPlace(); chooseHiddingPlaceAction = new ArtificialIntelligence.ChooseHiddingPlace(); changeRoomAction = new ArtificialIntelligence.ChangeRoom(); waitAction = new ArtificialIntelligence.Wait(); goalAction = new ArtificialIntelligence.Goal(); changeHiddingPlaceAction.SetAgent(agent); chooseHiddingPlaceAction.SetAgent(agent); changeRoomAction.SetAgent(agent); waitAction.SetAgent(agent); goalAction.SetAgent(agent); }
public void SetAgent(ArtificialIntelligence.IntelligentAgent agent) => this.agent = agent;
public void AddAgent(ArtificialIntelligence.IntelligentAgent agent) => agents.Add(agent);