Пример #1
0
        public void Init()
        {
            agent            = GetComponent <UnityEngine.AI.NavMeshAgent>();
            intelligentAgent = GetComponent <ArtificialIntelligence.IntelligentAgent>();

            cachedTransform = transform;
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void SetAgent(ArtificialIntelligence.IntelligentAgent agent) => this.agent = agent;
Пример #4
0
 public void AddAgent(ArtificialIntelligence.IntelligentAgent agent) => agents.Add(agent);