using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class UIMgr : MonoBehaviour { public static UIMgr ins; [SerializeField] private ForgePanel forgePanel; [SerializeField] private SwithPanel swithPanel; [SerializeField] private BattlePanel battlePanel; [SerializeField] private DrawingPanel drawingPanel; [SerializeField] private StorePanel storePanel; private void Awake() { ins = this; } public void OpenForgePanel() { forgePanel.gameObject.SetActive(true); swithPanel.gameObject.SetActive(true); battlePanel.gameObject.SetActive(false); drawingPanel.gameObject.SetActive(false); storePanel.gameObject.SetActive(false); } public void OpenBattlePanel() { forgePanel.gameObject.SetActive(false); swithPanel.gameObject.SetActive(true); battlePanel.gameObject.SetActive(true); drawingPanel.gameObject.SetActive(false); storePanel.gameObject.SetActive(false); } public void OpenDrawingPanel() { forgePanel.gameObject.SetActive(false); swithPanel.gameObject.SetActive(true); battlePanel.gameObject.SetActive(false); drawingPanel.gameObject.SetActive(true); storePanel.gameObject.SetActive(false); } public void OpenStorePanel() { forgePanel.gameObject.SetActive(false); swithPanel.gameObject.SetActive(true); battlePanel.gameObject.SetActive(false); drawingPanel.gameObject.SetActive(false); storePanel.gameObject.SetActive(true); } // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } }