void FixedUpdate() { if (hitDelta > 1.5) { enemyCombat.MeleeAttack(this.gameObject, GameObject.FindWithTag("Player")); hitDelta = 0; } else { hitDelta += Time.fixedDeltaTime; } }