private void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Bullet") && other.gameObject.layer != 13) //13 is PlayerProjectile layer { playerHealth.TakeDamage(damageToApply); } }
private void TakeDamage(int damage) { enemyHealth.TakeDamage(damage); }