private void Awake() { // Checks to make sure there is only one of this script loaded [Added by Bryce] if (gameSettings == null) { gameSettings = this; DontDestroyOnLoad(gameObject); } else if (gameSettings != this) { Destroy(gameObject); } }
private void Awake() { gameSettings = FindObjectOfType <GRHGameSettings>(); soundManager = FindObjectOfType <GRHBalloonMG_SoundManager>(); loadingScreen = GameObject.FindGameObjectWithTag("LoadingScreen").GetComponent <GRHLoadingScreen>(); difficultySettingPanelBalloonGame.SetActive(false); difficultySettingPanelCountingGame.SetActive(false); creditsPanel.SetActive(false); easyButton.enabled = false; mediumButton.enabled = false; hardButton.enabled = false; creditsToggle = false; }