Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
 void Awake()
 {
     levelController = GameObject.FindGameObjectWithTag("MusicController").GetComponent<MusicLevelController>();
 }
Beispiel #4
0
 void Awake()
 {
     musController = GameObject.FindGameObjectWithTag("MusicController").GetComponent <MusicLevelController>();
 }