private void Start() { audio = GameObject.Find("AudioManager").GetComponent <AudioController>(); soundtrack = GameObject.Find("Soundtrack").GetComponent <SoundtrackController>(); settings = GameObject.Find("SettingsMenu"); muteButton = GameObject.Find("MuteButton").GetComponent <Image>(); muteText = GameObject.Find("MuteText").GetComponent <TextMeshProUGUI>(); tickColorblind = GameObject.Find("TickColorblind"); tickParkinsons = GameObject.Find("TickParkinsons"); score = GameObject.Find("Score").GetComponent <TextMeshProUGUI>(); score.text = PlayerPrefs.GetInt("highScore").ToString(); if (PlayerPrefs.GetInt("mute") == 1) { muteButton.sprite = muted; muteText.text = "sound off"; } else { muteButton.sprite = unmuted; muteText.text = "sound on"; } tickColorblind.SetActive(PlayerPrefs.GetInt("colorBlindMode") == 1); tickParkinsons.SetActive(PlayerPrefs.GetInt("parkinsonsMode") == 1); settings.SetActive(false); }
void Start() { audio = GameObject.Find("AudioManager").GetComponent <AudioController>(); soundtrack = GameObject.Find("Soundtrack").GetComponent <SoundtrackController>(); foreach (Transform button in GameObject.Find("Buttons").transform) { buttons.Add(button.GetComponent <ButtonController>()); if (PlayerPrefs.GetInt("parkinsonsMode") == 1) { button.transform.localScale = new Vector3(1.5f, 1.5f, 1); } } newHighScore = GameObject.Find("NewHighScore"); feedback = GameObject.Find("Feedback"); scoreGameOver = GameObject.Find("GameOverScore").GetComponent <TextMeshProUGUI>(); highScoreGameOver = GameObject.Find("GameOverHighScore").GetComponent <TextMeshProUGUI>(); scoreTm = GameObject.Find("Score").GetComponent <TextMeshProUGUI>(); feedback.SetActive(false); bg = GameObject.Find("BG").GetComponent <Image>(); addToOrder(); currentButton = order.ElementAt(0); highScore = PlayerPrefs.GetInt("highScore"); sequenceComplete = true; awaitingInput = true; buttonCount = 0; bg.color = canClick; StartCoroutine(startByczq()); }
// Start is called before the first frame update void Start() { _soundtrackController = FindObjectOfType <SoundtrackController>(); if (_soundtrackController) { audioSource = _soundtrackController._chapterAudioSources[0]; } }
void Start() { if (instance == null) { instance = this; } else { Destroy(gameObject); } DontDestroyOnLoad(gameObject); source = gameObject.GetComponent <AudioSource>(); if (PlayerPrefs.GetInt("mute") == 0) { startSoundtrack(); } }