void Start() { musicManager = FindObjectOfType <MusicManager>(); musicVolume.value = PlayerPrefsManager.GetMusicVolume(); soundsController = FindObjectOfType <SoundsController>(); engineSoundController = FindObjectOfType <EngineSoundController>(); timerController = FindObjectOfType <TimerController>(); sfxVolume.value = PlayerPrefsManager.GetSfxVolume(); }
void Start() { cameraController = FindObjectOfType <CameraController>(); playerController = FindObjectOfType <PlayerController>(); uiController = FindObjectOfType <UIController>(); musicManager = FindObjectOfType <MusicManager>(); engineSoundController = FindObjectOfType <EngineSoundController>(); soundsController = FindObjectOfType <SoundsController>(); uiGameModesController = FindObjectOfType <UIGameModesController>(); uiGameModesController.SwitchMode(gameModeIndex); timeController = FindObjectOfType <TimerController>(); highScoreManager = FindObjectOfType <HighScoreManager>(); for (int i = 0; i < coneBoxesCount; i++) { spawner.SpawnConeBox(); } for (int i = 0; i < conesCount; i++) { spawner.SpawnCone(); } for (int i = 0; i < fuelTanksCount; i++) { spawner.SpawnFuel(); } spawner.SpawnAdditives(); spawner.SpawnSpeedBooster(); spawner.SpawnCursedCone(); ShowCursedCone(false); ShowAdditives(false); ShowCones(false); ShowTanks(false); musicManager.PlayMenuMusic(); }
void Awake() { _rb = GetComponent <Rigidbody>(); _lastCrashEventTime = Time.time; engineSoundController = GetComponent <EngineSoundController>(); }