diff --git a/Assets/Scripts/Enemy/EnemyAttack.cs b/Assets/Scripts/Enemy/EnemyAttack.cs index dad81580a11bf1a09b054e6948daf72dd5d9ea67..4b73ab212ffe64a6c8f682d13a9e138a1bab0066 100644 --- a/Assets/Scripts/Enemy/EnemyAttack.cs +++ b/Assets/Scripts/Enemy/EnemyAttack.cs @@ -83,14 +83,12 @@ public class EnemyAttack : MonoBehaviour void Update () { - if (playerInRange || petInRange) { - timer += Time.deltaTime; - } + timer += Time.deltaTime; // If the timer exceeds the time between attacks, the player is in range and this enemy is alive... - if(animating == false && timer >= attackOffset && (playerInRange || petInRange) && enemyHealth.currentHealth > 0) + if (animating == false && timer >= attackOffset && (playerInRange || petInRange) && enemyHealth.currentHealth > 0) { // ... attack. - // Debug.Log("Initiate attack"); // ! Debug + Debug.Log("Initiate attack"); // ! Debug Attack (); } if (animating == true) {