public void HandleGameOver() { foreach (var block in blocks) { if (block != null) { block.gameObject.GetComponent <BoxCollider>().isTrigger = false; block.gameObject.GetComponent <Rigidbody>().isKinematic = false; block.gameObject.GetComponent <Rigidbody>().useGravity = true; } } if (!_shapeSpawner.gameOver) { _shapeSpawner.EndGame(); PlaySound("GameOver"); } if (_shapeSpawner.powerupToggle != null) { if (!mobileController.isMobile() && !mobileController.powerupToggle.UiControls) { _shapeSpawner.powerupToggle.gameObject.SetActive(true); } } endGameUI.SetActive(false); }