Example #1
0
        float timer;                                // Timer for counting up to the next attack.

        void Awake()
        {
            // Setting up the references.
            player       = GameObject.FindGameObjectWithTag("Player");
            playerHealth = player.GetComponent <PlayerHealth> ();
            enemyHealth  = GetComponent <TutorialEnemyHealth>();
            anim         = GetComponent <Animator> ();
            audio        = GetComponent <Zombie_Audio>();
        }
 void Awake()
 {
     anim            = GetComponent <Animator>();
     hitParticles    = GetComponentInChildren <ParticleSystem>();
     capsuleCollider = GetComponent <CapsuleCollider>();
     boxCollider     = GetComponent <BoxCollider>();
     currentHealth   = startingHealth;
     audio           = GetComponent <Zombie_Audio>();
 }
Example #3
0
 void Awake()
 {
     anim = GetComponent <Animator>();
     // enemyAudio = GetComponent <AudioSource> ();
     hitParticles    = GetComponentInChildren <ParticleSystem>();
     capsuleCollider = GetComponent <CapsuleCollider>();
     boxCollider     = GetComponent <BoxCollider>();
     currentHealth   = startingHealth;
     audio           = GetComponent <Zombie_Audio>();
     gameController  = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>();
 }