private void OnCollisionEnter2D(Collision2D collision) { GameObject objectThing = collision.gameObject; if (!isGround) { isGround = true; animator.SetBool("jump", false); } if (objectThing.CompareTag("Boss")) { Die(); } if ((objectThing.layer == 11 && playerType == PlayerType.GRAY) || (objectThing.layer == 10 && playerType == PlayerType.PINK)) { if (PlayerStateManager.GetLife() == 1) { Die(); } Hurt(); Destroy(objectThing); } }