private void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == "ground") { isGrounded = true; } if (col.gameObject.tag == "deadly") { transform.position = startPos; } if (col.gameObject.tag == "deadly2") { transform.position = checkpoint; } if (col.gameObject.tag == "enemy") { if (isRolling) { Destroy(col.gameObject); } else { transform.position = checkpoint; } } if (col.gameObject.name == "step1") { myCamera.CameraZoom11(); } if (col.gameObject.name == "leaf (2)") { if (!showedGlass) { isShowingGlass = true; showedGlass = true; } } if (col.gameObject.tag == "Checkpoint") { LoadingScene(); } if (col.gameObject.tag == "WinningCheckpoint") { WinScene(); } }