Beispiel #1
0
    //=====================================================================================
    //
    //=====================================================================================

    void Awake()
    {
        TitlePanel          = this.transform.Find("Titre").GetComponent <IMenuPanel>();
        LevelSelectionPanel = this.transform.Find("SelectionNiveau").GetComponent <IMenuPanel>();
        ProgressionPanel    = this.transform.Find("Progression").GetComponent <IMenuPanel>();
        SettingsPanel       = this.transform.Find("Credits&Settings").GetComponent <IMenuPanel>();
    }
Beispiel #2
0
    //=====================================================================================
    //
    //=====================================================================================

    public void SwitchPanel(IMenuPanel newPanel)
    {
        if (_currentPanel != null)
        {
            _currentPanel.OnExit();
        }

        _currentPanel = newPanel;
        _currentPanel.OnEnter();
    }
Beispiel #3
0
    //=====================================================================================
    //
    //=====================================================================================

    public void SwitchPanel(IMenuPanel newPanel)
    {
        //Debug.Log("Menu: SwitchPanel!");

        if (_currentPanel != null)
        {
            _currentPanel.OnExit();
        }

        _currentPanel = newPanel;
        _currentPanel.OnEnter();
    }
Beispiel #4
0
    public void Click(IMenuPanel panel)
    {
        if (openedMenu != null)
        {
            openedMenu.ClosePanel();
        }

        if (panel == openedMenu)
        {
            openedMenu = null;
        }
        else
        {
            openedMenu = panel;
            openedMenu.OpenPanel();
        }
    }