Beispiel #1
0
    public void EnterGame(GameObject button = null)
    {
        ScreenTransition transitionScreen = FindObjectOfType <ScreenTransition>();

        if (transitionScreen)
        {
            transitionScreen.CloseDoor();
        }
        UIManager.Instance.TurnActive();
        if (button)
        {
            button.GetComponent <Image>().sprite = buttonPressSprite;
        }
        StartCoroutine(WaitforTransition());
        //if (transitionScrene.m_Animator.GetCurrentAnimatorStateInfo(0).IsName("Transition_Closed"))
        //{
        //    transitionScrene.transform.SetParent(null);
        //    DontDestroyOnLoad(transitionScrene.gameObject);
        //    UIManager.Instance.m_bInMainMenu = false;
        //    SceneManager.LoadScene(1);
        //}
    }