Exemplo n.º 1
0
    void FirstCut()
    {
        timer += Time.deltaTime;

        if (customAudioSource.source.clip != walkUpLadderSong)
        {
            customAudioSource.source.clip = walkUpLadderSong;
            customAudioSource.Play(walkUpLadderSong);
        }
        cutSceneCamera.enabled = true;
        playerMove.SetBool("Climbing", true);
        playerAnim.SetBool("Climbing", true);
        cutSceneCamera.transform.position = Vector3.MoveTowards(cutSceneCamera.transform.position, panPoints [1].transform.position, 0.02f);


        if (!customAudio.isPlaying() && !playedFanfare)
        {
            customAudio.PlayOnce();
            playedFanfare = true;
        }

        if (timer >= 2)
        {
            TransistToSecondCut();
        }
    }
Exemplo n.º 2
0
    void Update()
    {
        //main menu handler / UI handler
        if (GM.gameLoopActive)
        {
            ui.enabled       = true;
            mainMenu.enabled = false;
        }

        //death screen handler
        if (!GM.Player.Alive)
        {
            deathScreen.enabled = true;
            ui.enabled          = false;

            //Hacky place to make it play the lose music. Sorry :(
            CustomAudioSource cas = deathScreen.GetComponent <CustomAudioSource>();
            if (!cas.isPlaying())
            {
                mainCamera.GetComponent <CustomAudioSource>().Stop();
                cas.Play();
            }
        }
        else
        {
            deathScreen.enabled = false;
        }

        //pasue menu handler
        if (GM.gamePaused)
        {
            pauseMenu.enabled = true;
        }
        else
        {
            pauseMenu.enabled = false;
        }

        tutorial.enabled = GM.inTutorial;

        if (GM.roundWon)
        {
            winScreen.enabled = true;
        }
    }