コード例 #1
0
ファイル: Locomotion.cs プロジェクト: Pokoi/SGDJamII
        public void Init()
        {
            agent            = GetComponent <UnityEngine.AI.NavMeshAgent>();
            intelligentAgent = GetComponent <ArtificialIntelligence.IntelligentAgent>();

            cachedTransform = transform;
        }
コード例 #2
0
ファイル: DecisionMaker.cs プロジェクト: Pokoi/SGDJamII
        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);