void InitWindow(CUILoadState uiState, CUIController uiBase, bool open, params object[] args) { uiBase.OnInit(); if (OnInitEvent != null) { OnInitEvent(uiBase); } if (open) { OnOpen(uiState, args); uiBase.gameObject.SetActive(true); } else { if (!uiState.IsStaticUI) { CloseWindow(uiBase.UIName); // Destroy } else { uiBase.gameObject.SetActive(false); } } OnUIWindowLoadedCallbacks(uiState, uiBase); }
void InitWindow(CUILoadState uiState, CUIController uiBase, bool open, params object[] args) { uiBase.OnInit(); if (open) { OnOpen(uiState, args); uiBase.gameObject.SetActive(true); } }