using System.Collections; using System.Collections.Generic; using UnityEngine; public class PanelManager : MonoBehaviour { public GameObject Panel; [SerializeField] private GameObject PanelBack; [SerializeField] private GameObject PanelRuleOne; [SerializeField] private GameObject PanelRuleTwo; [SerializeField] private GameObject PanelRuleThree; [SerializeField] private GameObject PanelRuleFour; [SerializeField] private GameObject PanelRuleFive; public void OpenPanel() { if (Panel != null) { Panel.SetActive(true); } } public void ClosePanel() { if (Panel != null) { Panel.SetActive(false); } } //panel back public void OpenPanelBack() { if (PanelBack != null) { PanelBack.SetActive(true); } } public void ClosePanelBack() { if (PanelBack != null) { PanelBack.SetActive(false); } } // panel1 public void OpenPanelRuleOne() { if (PanelRuleOne != null) { PanelRuleOne.SetActive(true); } } public void ClosePanelRuleOne() { if (PanelRuleOne != null) { PanelRuleOne.SetActive(false); } } //panel2 public void OpenPanelRuleTwo() { if (PanelRuleTwo != null) { PanelRuleTwo.SetActive(true); } } public void ClosePanelRuleTwo() { if (PanelRuleTwo != null) { PanelRuleTwo.SetActive(false); } } //panel3 public void OpenPanelRuleThree() { if (PanelRuleThree != null) { PanelRuleThree.SetActive(true); } } public void ClosePanelRuleThree() { if (PanelRuleThree != null) { PanelRuleThree.SetActive(false); } } //panel4 public void OpenPanelRuleFour() { if (PanelRuleFour != null) { PanelRuleFour.SetActive(true); } } public void ClosePanelRuleFour() { if (PanelRuleThree != null) { PanelRuleFour.SetActive(false); } } //panel3 public void OpenPanelRuleFive() { if (PanelRuleFive != null) { PanelRuleFive.SetActive(true); } } public void ClosePanelRuleFivee() { if (PanelRuleFive != null) { PanelRuleFive.SetActive(false); } } }