Пример #1
0
    private void EndScreen()
    {
        Time.timeScale = 1.0f;
        menuState.SetActive(false);
        playState.transform.Find("Canvas").GetComponent <Canvas>().enabled = false;
        endState.SetActive(true);

        curStateUI = endState.GetComponent <StateUI>();
        curStateUI.SetActive();
    }
Пример #2
0
    private void Menu()
    {
        menuState = GameObject.Find("MenuState");
        playState = GameObject.Find("PlayState");
        endState  = GameObject.Find("EndState");

        Time.timeScale = 1.0f;
        menuState.SetActive(true);
        //playState.SetActive(false);
        playState.transform.Find("Canvas").GetComponent <Canvas>().enabled = false;
        endState.SetActive(false);

        curStateUI = menuState.GetComponent <StateUI>();
        curStateUI.SetActive();
    }