예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #3
0
 void Awake()
 {
     levelController = GameObject.FindGameObjectWithTag("MusicController").GetComponent<MusicLevelController>();
 }
예제 #4
0
파일: Timer.cs 프로젝트: turnerdavis/VGDSix
 void Awake()
 {
     musController = GameObject.FindGameObjectWithTag("MusicController").GetComponent <MusicLevelController>();
 }