public void OpenMenu() { Time.timeScale = 1 - Time.timeScale; if (!gameStarted) { clickStart.SetActive(!clickStart.activeSelf); flyingLight.SetActive(!flyingLight.activeSelf); } else { if (currentStage) { currentStage.SetActive(!currentStage.activeSelf); if (!currentBall.activeSelf) currentBall.GetComponent<BallCharacter>().InitializeBall(); currentBall.SetActive(!currentBall.activeSelf); } else { menu.SetActive(!menu.activeSelf); Time.timeScale = 1 - Time.timeScale; } } subMenus.ClearMenus(); menu.SetActive(!menu.activeSelf); }