private void OnCollisionStay2D(Collision2D collision) { if (collision.gameObject.tag == "Ground") { grounded = true; } if (collision.gameObject.tag == "Fall" || collision.gameObject.tag == "Trap") { sp.restart(); } }