Esempio n. 1
0
    private void OnEnable()
    {
        beeLevelUp.canvasRenderer.SetAlpha(0.0f);
        endText = gameObject.transform.Find("Text").GetComponent <Text>();

        // Test for lighting change and smooth background transitions
        preRenderBackground.setBackgroundTextures(Global.currentGameplayLevel);
        preRenderBackground.runTransition(Global.currentGameplayLevel, Global.currentGameplayLevel + 1);
        preRenderBackground.refresh();

        overlay.SetActive(true);
        overlay.GetComponent <Animator>().SetTrigger("FadeIn");
        GetComponent <Animator>().SetTrigger("FadeIn");

        timekeeper.slowdownTimescale();

        Input.backButtonLeavesApp = true;
    }
Esempio n. 2
0
    public void Pause(bool firstStart = false)
    {
        if (isPaused || StopwatchScript.timer > timerLimit)
        {
            return;
        }

        isPaused = true;

        // gameObject.SetActive(true);
        overlay.SetActive(true);
        overlay.GetComponent <Overlay>().fadeIn = true;
        if (!firstStart)
        {
            GetComponent <Animator>().SetTrigger("FadeIn");
            overlay.GetComponent <Animator>().SetTrigger("FadeIn");
        }

        timekeeper.slowdownTimescale();

        blade.SetActive(false);

        Input.backButtonLeavesApp = true;
    }