void Update()
    {
        float time = Time.time - initTime;

        if (time < 2)
        {
            gc.color = new Color(time / 2, time / 2, time / 2, 1);
        }
        else if (time < 4)
        {
            gc.color = new Color(1, 1, 1, 1);
        }
        else if (time < 6)
        {
            gc.color = new Color(1, 1, 1, (6 - time) / 2);
        }
        else if (time < 8)
        {
            black.color = new Color(0, 0, 0, (8 - time) / 2);
        }
        else if (time < 10)
        {
            black.color = new Color(0, 0, 0, 0);
        }
        else if (time < 12)
        {
            black.color = new Color(0, 0, 0, (time - 10) / 2);
        }
        else
        {
            SceneMover.MoveSceneStatic("StartScene");
        }
    }
示例#2
0
 void Update()
 {
     if (!isFinished && (MusicTime() >= 0 && MusicTime() <= musicLength))
     {
         slider.value = MusicTime() / musicLength;
     }
     else if (!isFinished && MusicTime() >= musicLength)
     {
         CheckWinner();
     }
     else if (isFinished)
     {
         if (Input.GetKeyDown(KeyCode.Space))
         {
             SceneMover.MoveSceneStatic("StartScene");
             MusicPlayer.PlayMusic(MusicType.Menu);
         }
     }
 }
示例#3
0
 void Update()
 {
     if (startMessage.active && MusicTime() >= -5 * oneBeat)
     {
         startMessage.SetActive(false);
     }
     if (!isFinished && (MusicTime() >= 0 && MusicTime() <= musicLength))
     {
         slider.value = MusicTime() / musicLength;
     }
     else if (!isFinished && MusicTime() >= musicLength)
     {
         Cleared();
     }
     else if (isFinished)
     {
         if (Input.GetKeyDown(KeyCode.Space))
         {
             SceneMover.MoveSceneStatic("StartScene");
             MusicPlayer.PlayMusic(MusicType.Menu);
         }
     }
 }