Example #1
0
    public void SetToPage(string pagename)
    {
        if (_currentPage != null)
        {
            _currentPage.OnPageExit();
        }

        for (int i = 0; i < _menuPages.Length; i++)
        {
            if (_menuPages[i].pageName == pagename)
            {
                _currentPage = _menuPages[i];
                _currentPage.EnableDisableContent(true);
                _currentPage.OnPageEnter();
                continue;
            }

            _menuPages[i].EnableDisableContent(false);
        }
    }