Exemple #1
0
        private void Start()
        {
            _simplePatrolAI = new PathfindingSimplePatrolAi(_simplePatrolAIView, new PathfindingStalkerAiModel(_simplePatrolAIConfig));

            _stalkerAI = new PathfindingStalkerAi(_stalkerAIView, new PathfindingStalkerAiModel(_stalkerAIConfig), _stalkerAISeeker, _stalkerAITarget);
            InvokeRepeating(nameof(RecalculateAIPath), 0.0f, 1.0f);
        }
Exemple #2
0
        private void Start()
        {
            _simplePatrolAI = new PathfindingSimplePatrolAi(_simplePatrolAIView, new PathfindingStalkerAiModel(_simplePatrolAIConfig));

            _stalkerAI = new PathfindingStalkerAi(_stalkerAIView, new PathfindingStalkerAiModel(_stalkerAIConfig), _stalkerAISeeker, _stalkerAITarget);
            InvokeRepeating(nameof(RecalculateAIPath), 0.0f, 1.0f);

            _protectorAI = new ProtectorAI(_protectorAIView, new PatrolAIModel(_protectorWaypoints), _protectorAIDestinationSetter, _protectorAIPatrolPath);
            _protectorAI.Init();

            _protectedZone = new ProtectedZone(_protectedZoneTrigger, new List <IProtector> {
                _protectorAI
            });
            _protectedZone.Init();
        }