public void OnTriggerEnter(Collider col) { if (col.CompareTag("boss")) { _caputMallei.addHealth(_healthBonus); _caputMallei.setBloodPoolCounter(_caputMallei.getBloodPoolCounter() - 1); Destroy(gameObject); } else if (col.CompareTag("Player")) { if (LayerMask.LayerToName(col.GetComponent <PlayerStatus>().GetPlayerLayer()).Equals("Default")) { return; } col.gameObject.GetComponent <PlayerStatus>().TakeDamage(_playerDamage); Destroy(gameObject); } }