void StoreClick() { if (store == null) { Facade.ShowPanel <StorePanel>(panel => { panel.gameObject.SetActive(true); store = panel; }); return; } if (store.gameObject.activeSelf) { store.HidePanel(); } else { store.ShowPanel(); } }
void StoreClick() { if (store == null) { Facade.Instance.ShowPanel <StorePanel>(Utility.UI.GetUIFullRelativePath("StorePanel"), panel => { panel.gameObject.name = "StorePanel"; panel.gameObject.SetActive(true); store = panel; }); return; } if (store.gameObject.activeSelf) { store.HidePanel(); } else { store.ShowPanel(); } }