void OnCollisionEnter2D(Collision2D collision) { if (LayerMask.LayerToName(collision.gameObject.layer) == "Borders") { resetPlaneInIngame(); obstacles.resetObstaclesInIngame(); uiController.resetScore(); } }