void Awake() { baseSpeed = player.playerSpeed; speedBoost = player.playerSpeed * player.speedUpMult; speedNerf = player.playerSpeed * player.speedDownMult; try { musicController = GameObject.FindGameObjectWithTag("MusicController").GetComponent <MusicLevelController>(); playerRigidBody = GameObject.Find("playerCylinder").GetComponent <Rigidbody>(); currentPlayer = GameObject.FindGameObjectWithTag("Player").GetComponent <player>(); redSoundSource = GetComponent <AudioSource>(); redSoundSource.volume = 0.5f; } catch (System.NullReferenceException e) { Debug.LogError(e.Message); } }
void Awake() { baseSpeed = player.playerSpeed; speedBoost = player.playerSpeed * player.speedUpMult; speedNerf = player.playerSpeed * player.speedDownMult; try { musicController = GameObject.FindGameObjectWithTag("MusicController").GetComponent<MusicLevelController>(); playerRigidBody = GameObject.Find("playerCylinder").GetComponent<Rigidbody>(); currentPlayer = GameObject.FindGameObjectWithTag("Player").GetComponent<player>(); greenSoundSource = GetComponent<AudioSource>(); greenSoundSource.volume = 0.5f; } catch (System.NullReferenceException e) { Debug.LogError(e.Message); } }
void Awake() { levelController = GameObject.FindGameObjectWithTag("MusicController").GetComponent<MusicLevelController>(); }
void Awake() { musController = GameObject.FindGameObjectWithTag("MusicController").GetComponent <MusicLevelController>(); }