Exemplo n.º 1
0
        public void SetupAI()
        {
            botAttack = instance.GetComponent <BotAttack>();

            botMovement = instance.GetComponent <BotMovement>();

            stateController = instance.GetComponent <StateController>();
            botMovement.SetupAI(stateController.SetupAI(true));
        }
Exemplo n.º 2
0
        void Start()
        {
            botAttack   = GetComponent <BotAttack>();
            botHealth   = GetComponent <BotHealth>();
            botMovement = GetComponent <BotMovement>();
            botMovement.navMeshAgent.speed = aiParameters.moveSpeed;

            // If "Failed to create agent because it is not close enough to the NavMesh" appears
            // that's because the object linked with nma is too far from the floor for example
        }