void Death() { Destroy(gameObject); animController.isDead(); //enemyAudio.clip = deathClip; //enemyAudio.Play (); }
void Update() { timer += Time.deltaTime; if (timer >= timeBetweenAttacks && enemyHealth.currentHealth > 0) { Debug.Log("begining scan Range"); ScanRange(); } if (playerHealth.currentHealth <= 0) { EnemyAnimatorScript.isDead(); } }