private void EnterMenu()
 {
     menuScreen.Fade(0f, 1f, () => {
         menuScreen.Activate();
         gameState = GameState.Menu;
     });
 }
Exemplo n.º 2
0
    IEnumerator _TransitionTo(MenuScreen arg)
    {
        scrnLast.Deactivate();
        yield return(waitTransition);

        arg.Activate();
        scrnLast = arg;
    }
 private void EnterRestartState()
 {
     if (gameState == GameState.Completed)
     {
         return;
     }
     if (gameState == GameState.Restart)
     {
         return;
     }
     gameState = GameState.Restart;
     restartScreen.Fade(0f, 1f, () => {
         restartScreen.Activate();
     });
 }
Exemplo n.º 4
0
    IEnumerator _FadeIn()
    {
        yield return(new WaitForSeconds(.5f));

        while (fade.color.a > 0)
        {
            fade.color += new Color(0, 0, 0, -.1f);
            yield return(null);
        }
        fade.color = Color.clear;

        yield return(new WaitForSeconds(2.5f));

        scrnLogo.Activate();
        scrnLast = scrnLogo;
    }
Exemplo n.º 5
0
 IEnumerator _TransitionTo(MenuScreen arg)
 {
     scrnLast.Deactivate();
     yield return waitTransition;
     arg.Activate();
     scrnLast = arg;
 }