Beispiel #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();
        }
    }
Beispiel #2
0
    void Update()
    {
        if (cuts != Cuts.end)
        {
            if (!hasPlayed)
            {
                cas.PlayOnce();
                hasPlayed = true;
            }
        }
        if (Input.GetKeyDown(KeyCode.T))
        {
            active = true;
            cuts   = Cuts.cutOne;
        }

        if (active)
        {
            switch (cuts)
            {
            case Cuts.cutOne:
                CutOne();
                break;

            case Cuts.cutTwo:
                CutTwo();
                break;

            case Cuts.end:
                End();
                break;
            }
        }

        if (!active)
        {
            reset();
        }
    }