Example #1
0
    private IEnumerator ToNaration()
    {
        TweenAlpha.AddTween(Logo, 1, 0, 0.3f);
        yield return(new WaitForSeconds(0.3f));

        TweenAlpha.AddTween(Naration, 0, 1, 0.3f);
    }
Example #2
0
    private IEnumerator LoadNextSceneCoroutine(float delay = 2.0f)
    {
        m_ChangerPanel.FaderText.text = "FLOOR " + (m_finshedLevelCount).ToString();
        m_finshedLevelCount++;
        yield return(new WaitForSeconds(delay));

        Player.SetAlive(false);
        //m_ChangerPanel.LoaderPanel.SetTrigger("Slide");
        TweenAlpha.AddTween(m_ChangerPanel.Fader, 0, 1, 0.3f);
        yield return(new WaitForSeconds(0.75f));

        m_uiroot.group.alpha = 1;
        AsyncOperation unload = SceneManager.UnloadSceneAsync(m_previousSceneName);

        m_currentSceneID = m_currentSceneID + 1;
        if (m_currentSceneID > 7)
        {
            m_currentSceneID = 3;
        }
        m_currentDifficulty = m_currentDifficulty + 1;
        m_previousSceneName = "Level_" + m_currentSceneID.ToString("00");

        while (unload.isDone == false)
        {
            yield return(new WaitForEndOfFrame());
        }
        //yield return new WaitForSeconds(1.0f);
        SceneManager.LoadScene(m_previousSceneName, LoadSceneMode.Additive);

        Player.animator.SetTrigger("Out");
        yield return(new WaitForSeconds(1.0f));

        //Destroy(Splash);
        //yield return new WaitForSeconds(0.3f);
        m_root = null;
        while (m_root == null)
        {
            m_root = GameObject.FindGameObjectWithTag("SceneRoot").GetComponent <SceneRoot>();
            yield return(new WaitForEndOfFrame());
            //yield return new WaitForSeconds(1.0f);
        }
        Player.transform.position = m_root.PlayerSpawn.position;
        //m_ChangerPanel.LoaderPanel.SetTrigger("SlideOut");
        TweenAlpha.AddTween(m_ChangerPanel.Fader, 1, 0, 0.3f);
        //GameObject.FindGameObjectWithTag("SceneRoot").GetComponent<Animator>().SetTrigger("Slide");
        yield return(new WaitForSeconds(00.3f));

        Player.animator.SetTrigger("Fall");
        yield return(new WaitForSeconds(00.5f));

        Player.SetAlive(true);
        yield return(new WaitForSeconds(00.5f));

        m_root.StartScene(m_currentDifficulty);
        LoadNextRoutine = null;
    }
Example #3
0
    public void OnClic()
    {
        if (FreezeTimer > 0)
        {
            return;
        }

        if (m_onNaration)
        {
            FreezeTimer = int.MaxValue;
            TweenAlpha.AddTween(Naration, 1, 0, 0.3f);
            StartCoroutine(LoadScene());
        }
        else
        {
            FreezeTimer  = 1;
            m_onNaration = true;
            StartCoroutine(ToNaration());
        }
    }
Example #4
0
    private IEnumerator ReloadRoutine()
    {
        TweenAlpha.AddTween(m_ChangerPanel.GameOver.gameObject, 0, 1, 0.3f);
        TweenAlpha.AddTween(m_ChangerPanel.Fader, 0, 1, 0.3f);

        yield return(new WaitForSeconds(2.0f));

        while (click == false)
        {
            yield return(null);
        }
        GameObject.Destroy(Player.gameObject);
        m_currentDifficulty = 0;
        m_finshedLevelCount = 0;
                #if DEMO
        SceneManager.LoadScene("Openning");
        #else
        SceneManager.LoadScene("Title");
                #endif
    }