Exemplo n.º 1
0
    void OnGUI()
    {
        if (instance == null)
        {
            instance = this;
        }

        if (currentMenuState != null)
        {
            currentMenuState.OnGUI();
        }
        else
        {
            OpenMenu();
        }
    }
Exemplo n.º 2
0
 void Awake()
 {
     instance = this;
 }