Ejemplo n.º 1
0
    public void ChangeState(string state)
    {
        //  if(state != eState){
        ePrevState = eState;
        DisableMenus();
        switch (state)
        {
        case "Main":
            eState = eMenuStates.Main;
            gMain.SetActive(true);
            break;

        case "FreeFly":
            eState = eMenuStates.FreeFly;
            gFreeFly.SetActive(true);
            break;

        case "Challenge":
            eState = eMenuStates.Challenge;
            gChallenge.SetActive(true);
            break;

        case "Settings":
            eState = eMenuStates.Settings;
            gSettings.SetActive(true);
            break;
        }
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     eState = eMenuStates.Main;
     DisableMenus();
     gMain.SetActive(true);
 }