void UpdateShowVideo()
    {
        float loopTime = musicHandler.GetCurrentSequenceTime() % loopLength;

        if (loopLength - loopTime <= fadeToBlack)
        {
            SetState(State.FadeToBlack);
        }
    }
    // Use this for initialization
    void Start()
    {
        musicHandler = GameHandler.musicHandler;

        float loopLength      = musicHandler.GetCurrentSequenceLength();
        float currentLoopTime = musicHandler.GetCurrentSequenceTime();

        float minCutsceneTime = minWingsFadeIn + wingsShowTime + fadeToWhiteTime;

        float nrOfLoops         = Mathf.Ceil((currentLoopTime + minCutsceneTime) / loopLength);
        float totalCutsceneTime = nrOfLoops * loopLength - currentLoopTime;

        float timeDiff = totalCutsceneTime - minCutsceneTime;

        wingFadeTime    = minWingsFadeIn + (timeDiff * 0.5f);
        fadeToWhiteTime = minFadeToWhiteTime + (timeDiff * 0.5f);

        SetState(State.FadingInWings);
    }
    void UpdateFadeOutOrion()
    {
        float alpha = Mathf.Clamp01(currentTimer / orionFadeTime);

        overlay.GetComponent <Image>().color = new Vector4(1, 1, 1, alpha);

        if (alpha == 1.0f)
        {
            float loopLength      = musicHandler.GetCurrentSequenceLength();
            float currentLoopTime = musicHandler.GetCurrentSequenceTime();

            float minimumLoops = currentLoopTime < musicHandler.GetLoopFadeTime() ? 1 : 2;

            float nrOfLoops = Mathf.Max(minimumLoops, Mathf.Ceil((currentLoopTime + minCreditsTime) / loopLength));
            creditsTime = nrOfLoops * loopLength - currentLoopTime;

            credits.StartCredits(creditsTime);

            SetState(State.Credits);
            musicHandler.TriggerLoopSequence(musicTrigger);
        }
    }