public void RemovePanel(ISimuPanel simuPanel) { if (panels.Contains(simuPanel)) { panels.Remove(simuPanel); } }
public void CloseLastPanel() { if (panels.Count > 0) { ISimuPanel simuPanel = panels[panels.Count - 1]; simuPanel.SetPanelActive(false); panels.Remove(simuPanel); } }
void Start() { m_button = GetComponent <Button>(); m_button.onClick.AddListener(() => { PanelTools.Instance.CloseAllMenu(this); }); if (targetGO == null) { targetGO = transform.GetChild(1).gameObject; } var p = targetGO.GetComponent <ISimuPanel>(); if (p != null) { panel = p; } }
public void AddPanel(ISimuPanel simuPanel) { panels.Add(simuPanel); }