Esempio n. 1
0
    protected IEnumerator ExitToGameCoroutine()
    {
        yield return(new WaitForSeconds(0.5f));

        RexSceneManager.Instance.LoadSceneWithFadeOut("Demo_1", Color.white, false);

        yield return(new WaitForSeconds(0.25f));

                #if UNITY_ANDROID || UNITY_IPHONE
        RexTouchInput rexTouchInput = GameManager.Instance.player.GetComponent <RexTouchInput>();
        if (rexTouchInput != null)
        {
            rexTouchInput.ToggleTouchInterface(true);
        }
                #endif

        ScoreManager.Instance.gameObject.SetActive(true);
        ScoreManager.Instance.SetScoreAtCheckpoint(0);
        ScoreManager.Instance.SetScore(0);

        if (GameManager.Instance.player.hp.bar)
        {
            GameManager.Instance.player.hp.bar.gameObject.SetActive(true);
        }

        if (GameManager.Instance.player.hp)
        {
            GameManager.Instance.player.RestoreHP(GameManager.Instance.player.hp.max);
        }

        LivesManager.Instance.Show();
    }
Esempio n. 2
0
    void Start()
    {
        RexTouchInput rexTouchInput = GameManager.Instance.player.GetComponent <RexTouchInput>();

        if (rexTouchInput != null)
        {
            rexTouchInput.ToggleTouchInterface(false);
        }

        LivesManager.Instance.Hide();
        GameManager.Instance.player.gameObject.SetActive(false);
        GameManager.Instance.player.hp.bar.gameObject.SetActive(false);
        ScoreManager.Instance.text.gameObject.SetActive(false);
        PauseManager.Instance.isPauseEnabled = false;
    }