void Awake() { m_instance = transform.GetComponentsInChildren <MogoForwardLoadingUIManager>(true)[0]; m_myTransform = transform; m_goGlobleLoadingUI = m_myTransform.FindChild("MogoGlobleLoadingUI").gameObject; bool isContinue = true; for (int i = 0; isContinue; i++) { Transform m_goGlobleLoadingUIButtonTemp = m_myTransform.FindChild(String.Concat("MogoGlobleLoadingUIButton", i)); if (m_goGlobleLoadingUIButtonTemp) { m_goGlobleLoadingUIButtonTemp.gameObject.AddComponent <MogoGlobleLoadingUIButton>(); } else { isContinue = false; } } m_defaultUI = GameObject.Find("MogoDefaultUI"); m_goLoadingUICamera = m_defaultUI.transform.FindChild("DefaultUICamera").gameObject; m_mgl = m_goGlobleLoadingUI.AddComponent <MogoGlobleLoadingUI>(); //Debug.LogError("MogoForwardLoadingUIManager awake!"); }
void Awake() { m_instance = transform.GetComponentsInChildren<MogoForwardLoadingUIManager>(true)[0]; m_myTransform = transform; m_goGlobleLoadingUI = m_myTransform.FindChild("MogoGlobleLoadingUI").gameObject; bool isContinue = true; for (int i = 0; isContinue; i++) { Transform m_goGlobleLoadingUIButtonTemp = m_myTransform.FindChild(String.Concat("MogoGlobleLoadingUIButton", i)); if (m_goGlobleLoadingUIButtonTemp) { m_goGlobleLoadingUIButtonTemp.gameObject.AddComponent<MogoGlobleLoadingUIButton>(); } else { isContinue = false; } } m_defaultUI = GameObject.Find("MogoDefaultUI"); m_goLoadingUICamera = m_defaultUI.transform.FindChild("DefaultUICamera").gameObject; m_mgl = m_goGlobleLoadingUI.AddComponent<MogoGlobleLoadingUI>(); //Debug.LogError("MogoForwardLoadingUIManager awake!"); }
void OnDestroy() { m_myTransform = null; m_defaultUI = null; m_goGlobleLoadingUI = null; m_goLoadingUICamera = null; m_mgl = null; }
public void SetLoadingStatus(int progress) { if (m_mgl == null) { m_mgl = m_goGlobleLoadingUI.GetComponentsInChildren <MogoGlobleLoadingUI>(true)[0]; } m_mgl.LoadingStatus = progress; }
public void FillGlobalLoadingUIData(GlobleLoadingUIData gd) { if (m_mgl == null) { m_mgl = m_goGlobleLoadingUI.GetComponentsInChildren <MogoGlobleLoadingUI>(true)[0]; } m_mgl.LoadingTip = gd.tip; m_mgl.LoadingStatus = gd.status; }
public void ShowGlobleLoadingUI(bool isShow, int tipId = 0, int textureId = 0) { //Debug.Log("ShowGlobleLoadingUI:" + isShow); m_goGlobleLoadingUI.SetActive(isShow); //if (m_msgBoxCamera == null) // m_msgBoxCamera = GameObject.Find("MessageBoxCamera"); //if (m_msgBoxCamera != null) // m_msgBoxCamera.SetActive(isShow); if (isShow) { m_globleCamera.clearFlags = CameraClearFlags.SolidColor; m_globleCamera.backgroundColor = Color.black; MogoGlobleLoadingUI loadingView = m_goGlobleLoadingUI.GetComponent <MogoGlobleLoadingUI>(); loadingView.LoadingTip = LoadingTipsData.GetTip(tipId); loadingView.LoadingImgBg = LoadingTexturesData.GetTexture(textureId); loadingView.LoadingStatus = 0; //uint tId = 0; //tId = TimerHeap.AddTimer(0, 5, () => //{ // if (loadingView.LoadingStatus >= 100) return; // loadingView.LoadingStatus += 1; //}); //TimerHeap.AddTimer(800, 0, () => //{ // TimerHeap.DelTimer(tId); //}); if (MFUIManager.CurrentUI == MFUIManager.MFUIID.EnterWaittingMessageBox) { } } else { m_globleCamera.clearFlags = CameraClearFlags.Depth; } }
public void SetLoadingStatus(int progress) { if (m_mgl == null) m_mgl = m_goGlobleLoadingUI.GetComponentsInChildren<MogoGlobleLoadingUI>(true)[0]; m_mgl.LoadingStatus = progress; }
public void FillGlobalLoadingUIData(GlobleLoadingUIData gd) { if (m_mgl == null) m_mgl = m_goGlobleLoadingUI.GetComponentsInChildren<MogoGlobleLoadingUI>(true)[0]; m_mgl.LoadingTip = gd.tip; m_mgl.LoadingStatus = gd.status; }