public void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Player")) { if (aiInvuln == false) { if (bossManager.aiHealth == 2) { bossManager.aiHealth -= 1; Instantiate(bloodSplat, transform.position, Quaternion.identity); TakeDamage(); bossManager.OnAiHit(); } else if (bossManager.aiHealth == 1) { bossManager.OnAiDeath(); } } else { return; } } }