Example #1
0
    IEnumerator updateSplashScene()
    {
        while (startFinished)
        {
            if ((Input.touches.Length > 0 || Input.GetMouseButtonDown(0)) && !bountiveFadeScript.isTransitioning() && !bountiveFadeScript.isTransitionOver())
            {
                StartCoroutine(bountiveFadeScript.fade());
            }
            else if (introBlackFadeScript.isTransitionOver() && !bountiveFadeScript.isTransitionOver())
            {
                elapsedPauseTime += Time.deltaTime;

                if (elapsedPauseTime >= pauseTime && !bountiveFadeScript.isTransitioning())
                {
                    StartCoroutine(bountiveFadeScript.fade());
                    elapsedPauseTime = 0;
                }
            }

            if (bountiveFadeScript.isTransitionOver() && !outroBlackFadeScript.isTransitionOver() && !outroBlackFadeScript.isTransitioning())
            {
                StartCoroutine(outroBlackFadeScript.fade());
            }

            if (outroBlackFadeScript.isTransitionOver())
            {
                setHomeScreen();
            }

            yield return(null);
        }
    }
Example #2
0
    IEnumerator updateHomeScene()
    {
        while (true)
        {
            if (tapToPlayTextObj.activeSelf && !titleTransitionScript.isTransitioning() && (Input.touchCount > 0 || Input.GetMouseButtonDown(0)))
            {
                StartCoroutine(titleTransitionScript.fade());
                tapToPlayTransitionScript.startingAlpha = tapToPlayTextObj.GetComponent <Text>().color.a;
                StartCoroutine(tapToPlayTransitionScript.fade());
            }

            if (titleTransitionScript.isTransitionOver())
            {
                GameManagerScript.getGameManagerScript().startGame();
                SceneManager.LoadScene("Scenes/play_scene");
            }

            if (parallaxScript.getIsFinishingAnimation())
            {
                if (!tapToPlayTextObj.activeSelf)
                {
                    tapToPlayTextObj.SetActive(true);
                }
            }

            yield return(null);
        }
    }