Example #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 <Potions_PlayerHealth> ();
            enemyHealth  = GetComponent <Potions_EnemyHealth> ();
            nav          = GetComponent <UnityEngine.AI.NavMeshAgent> ();
        }
Example #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 <Potions_PlayerHealth> ();
            enemyHealth  = GetComponent <Potions_EnemyHealth>();
            anim         = GetComponent <Animator> ();
        }
Example #3
0
 void Awake()
 {
     player       = GameObject.FindGameObjectWithTag("Player");
     playerHealth = player.GetComponent <Potions_PlayerHealth>();
 }