// This method handle the enemy attack. Every attack rate, the enemy turret marked takes damage. void MeleeAttack() { currentAttackRate -= Time.deltaTime; if (currentAttackRate <= 0) { enemyToAttack.TakeDamage(meleeAttackDamage); currentAttackRate = attackRate; } }