Esempio n. 1
0
        UnityEngine.AI.NavMeshAgent nav; // Reference to the nav mesh agent.


        void Awake()
        {
            // Set up the references.
            player       = GameObject.FindGameObjectWithTag("Player").transform;
            playerHealth = player.GetComponent <Done_PlayerHealth> ();
            enemyHealth  = GetComponent <Done_EnemyHealth> ();
            nav          = GetComponent <UnityEngine.AI.NavMeshAgent> ();
        }
Esempio n. 2
0
        float timer;                                // Timer for counting up to the next attack.


        void Awake()
        {
            // Setting up the references.
            player       = GameObject.FindGameObjectWithTag("Player");
            playerHealth = player.GetComponent <Done_PlayerHealth> ();
            enemyHealth  = GetComponent <Done_EnemyHealth>();
            anim         = GetComponent <Animator> ();
        }