void OnClickbtn(ButtonScript obj, object args, int param1, int param2) { if (OnoffmakeOk != null) { OnoffmakeOk(); } if (UpdateBabyInfoOk != null) { UpdateBabyInfoOk(); } TabsSelect(param1); if (param1 == 0) { isState = true; tishiLabel.gameObject.SetActive(true); if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(true); } zhongzuObj.SetActive(true); listObj.SetActive(true); stateUI.SetActive(true); if (posObj != null) { posObj.SetActive(false); } if (reductionObj != null) { reductionObj.SetActive(false); } if (ReformObj != null) { ReformObj.SetActive(false); } if (posObj != null) { posObj.SetActive(false); } if (epuObj != null) { epuObj.SetActive(false); } if (QianghuaObj != null) { QianghuaObj.SetActive(false); } NetWaitUI.HideMe(); Babypdate(); MainbabyReformUI.isMainbabyReformUI = false; } else if (param1 == 1) { batstate = 1; Babypdate(); isState = false; tishiLabel.gameObject.SetActive(false); if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } zhongzuObj.SetActive(false); if (QianghuaObj != null) { QianghuaObj.SetActive(false); } if (reductionObj != null) { reductionObj.SetActive(false); } if (ReformObj != null) { ReformObj.SetActive(false); } if (epuObj != null) { epuObj.SetActive(false); } stateUI.SetActive(false); listObj.SetActive(true); if (posObj != null) { posObj.SetActive(true); NetWaitUI.HideMe(); } else { NetWaitUI.ShowMe(); LoadUI(UIASSETS_ID.UIASSETS_mainbabyshuxingPanel, 1); loadUIList.Add((int)UIASSETS_ID.UIASSETS_mainbabyshuxingPanel); } MainbabyReformUI.isMainbabyReformUI = false; } else if (param1 == 2) { batstate = 2; isState = false; tishiLabel.gameObject.SetActive(false); if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } if (posObj != null) { posObj.SetActive(false); } if (ReformObj != null) { ReformObj.SetActive(false); } if (QianghuaObj != null) { QianghuaObj.SetActive(false); } if (epuObj != null) { epuObj.SetActive(false); } stateUI.SetActive(false); listObj.SetActive(true); if (reductionObj != null) { reductionObj.SetActive(true); NetWaitUI.HideMe(); } else { NetWaitUI.ShowMe(); LoadUI(UIASSETS_ID.UIASSETS_huanyuanPanel, 2); loadUIList.Add((int)UIASSETS_ID.UIASSETS_huanyuanPanel); } MainbabyReformUI.isMainbabyReformUI = false; } else if (param1 == 3) { batstate = 3; isState = false; tishiLabel.gameObject.SetActive(false); if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } if (posObj != null) { posObj.SetActive(false); } if (ReformObj != null) { ReformObj.SetActive(false); } stateUI.SetActive(false); if (epuObj != null) { epuObj.SetActive(false); } if (reductionObj != null) { reductionObj.SetActive(false); } listObj.SetActive(true); if (QianghuaObj != null) { QianghuaObj.SetActive(true); NetWaitUI.HideMe(); } else { NetWaitUI.ShowMe(); LoadUI(UIASSETS_ID.UIASSETS_QianghuaPanel, 3); } MainbabyReformUI.isMainbabyReformUI = false; } else if (param1 == 4) { batstate = 4; isState = false; tishiLabel.gameObject.SetActive(false); if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } if (epuObj != null) { epuObj.SetActive(false); } if (posObj != null) { posObj.SetActive(false); } if (reductionObj != null) { reductionObj.SetActive(false); } if (QianghuaObj != null) { QianghuaObj.SetActive(false); } stateUI.SetActive(false); listObj.SetActive(false); if (ReformObj != null) { ReformObj.SetActive(true); NetWaitUI.HideMe(); } else { NetWaitUI.ShowMe(); LoadUI(UIASSETS_ID.UIASSETS_babygaizaoPanel, 4); loadUIList.Add((int)UIASSETS_ID.UIASSETS_babygaizaoPanel); } MainbabyReformUI.isMainbabyReformUI = true; } else if (param1 == 6) { batstate = 6; isState = false; tishiLabel.gameObject.SetActive(false); if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } if (posObj != null) { posObj.SetActive(false); } if (reductionObj != null) { reductionObj.SetActive(false); } if (QianghuaObj != null) { QianghuaObj.SetActive(false); } if (ReformObj != null) { ReformObj.SetActive(false); } stateUI.SetActive(false); listObj.SetActive(true); if (epuObj != null) { epuObj.SetActive(true); NetWaitUI.HideMe(); } else { NetWaitUI.ShowMe(); LoadUI(UIASSETS_ID.UIASSETS_BabyEquPanle, 6); loadUIList.Add((int)UIASSETS_ID.UIASSETS_BabyEquPanle); } MainbabyReformUI.isMainbabyReformUI = false; } }
void Babypdate() { if (GamePlayer.Instance.babies_list_.Count == 0) { tishiLabel.gameObject.SetActive(true); // if(batstate == 4) // return; // tishiLabel.gameObject.SetActive(true); // stateUI.SetActive (false); // if(posObj!=null) // posObj.SetActive(false); // if(reductionObj!=null) // reductionObj.SetActive(false); // if(ReformObj!=null) // ReformObj.SetActive(false); if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } // // zhongzuObj.SetActive(false); } else { tishiLabel.gameObject.SetActive(false); zhongzuObj.SetActive(true); if (isState) { if (stateUI != null) { stateUI.SetActive(true); } if (BankSystem.instance.isopen) { if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } } else { if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(true); } } } else { if (batstate == 1) { if (posObj != null && !posObj.activeSelf) { posObj.SetActive(true); } } else if (batstate == 2) { if (reductionObj != null && !reductionObj.activeSelf) { reductionObj.SetActive(true); } } else if (batstate == 3) { if (QianghuaObj != null && !QianghuaObj.activeSelf) { QianghuaObj.SetActive(true); } } else if (batstate == 4) { if (ReformObj != null && !ReformObj.activeSelf) { ReformObj.SetActive(true); } } if (stateUI != null) { stateUI.SetActive(false); } if (MainbabyListUI.babyObj != null) { MainbabyListUI.babyObj.SetActive(false); } } } }