using System.Collections; using System.Collections.Generic; using UnityEngine; public class Panel_Settings : TWS_UIPanel { public List allSubPanels = new List(); public override void OnPanelClosed() { UI_Manager.Instance.OpenPanel(); } public override void Initialize() { DisableAllPanels(); allSubPanels[0].SetActive(true); } void DisableAllPanels() { allSubPanels.ForEach(x => { x.SetActive(false); }); } public void OpenPanel(GameObject panelToBeOpened) { DisableAllPanels(); panelToBeOpened.SetActive(true); } }