private void OnCollisionEnter2D(Collision2D collision) { if (collision.collider.tag == "Floor") { isGrounded = true; } if (collision.collider.tag == "Enemy") { counter.removeLives(); } }