//===================================================================================== // //===================================================================================== 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>(); }
//===================================================================================== // //===================================================================================== public void SwitchPanel(IMenuPanel newPanel) { if (_currentPanel != null) { _currentPanel.OnExit(); } _currentPanel = newPanel; _currentPanel.OnEnter(); }
//===================================================================================== // //===================================================================================== public void SwitchPanel(IMenuPanel newPanel) { //Debug.Log("Menu: SwitchPanel!"); if (_currentPanel != null) { _currentPanel.OnExit(); } _currentPanel = newPanel; _currentPanel.OnEnter(); }
public void Click(IMenuPanel panel) { if (openedMenu != null) { openedMenu.ClosePanel(); } if (panel == openedMenu) { openedMenu = null; } else { openedMenu = panel; openedMenu.OpenPanel(); } }