Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (timeLeft > 0)                                    //What happens before the boss fight
     {
         timeLeft       -= Time.deltaTime;                //Time.deltaTime is the number of seconds that have occured since the last frame
         timeLeftUI.text = "Time Left: " + (int)timeLeft; //If we don't do the integer cast, it'll display the full floating point number
     }
     else
     {
         if (!bossStarted)               //Play the new song when the boss starts and turn off the UI
         {
             bossStarted = true;
             musicPlayer.PlaySong(MusicPlayerScript.BOSS_MUSIC);
             timeLeftUI.enabled = false;
         }
         // This is mostly for fun. What do you think will happen?
         Instantiate(boss, this.gameObject.transform.position, Quaternion.identity);
     }
 }
 void Start()
 {
     handler   = GameObject.Find("/UI/VignetteController").GetComponent <CutsceneScript>();
     movscript = GameObject.Find("Player").GetComponent <PlayerMovement>();
     mps.PlaySong("Sounds/Music/Floor_Mood", 1, true);
 }