public void ShowMessageBox(string strMsg, MssageType type, byte RoomID = 0, uint ExData = 0) { if (WindObj == null) { return; } if (m_ChildMsgObj[2].activeSelf == true && type == MssageType.Exit_Msg_5) { ShutDown(); return; } for (byte i = 0; i < m_ChildMsgObj.Length; ++i) { if (m_ChildMsgObj[i].activeSelf == true) { ShutDown(); } } WndManager.Instance.Push(BaseTranF); m_MsgType = type; m_RoomID = RoomID; WindObj.SetActive(true); m_MaskObj.SetActive(true); m_MessageWind[1].SetActive(true); m_NormalPopAnim.ResetToBeginning(); m_NormalPopAnim.PlayForward(); //for (byte i = 0; i < m_ChildMsgObj.Length; ++i) //{ // m_ChildMsgObj[i].SetActive(false); //} switch (type) { case MssageType.PayScuess_Mag_0: // { m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.GameRoom_Msg_1: { m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.GameRoom_Msg_2: { m_ChildMsgObj[1].SetActive(true); m_MsgBoxLabel[1].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.GameRoom_Msg_3: { m_ChildMsgObj[0].SetActive(true); GetDstUnlockRateConsume(strMsg); break; } case MssageType.GoldLack_Msg_4: { m_ChildMsgObj[0].SetActive(true); string strDec = ""; if (strMsg == "金币") { strDec = string.Format(StringTable.GetString("Ec_RoleCharm_GlodNotEnough"), strMsg); m_Paytype = PayType.Gold; } else if (strMsg == "钻石") { strDec = string.Format(StringTable.GetString("Ec_RoleCharm_GlodNotEnough"), strMsg); m_Paytype = PayType.Diamond; } m_MsgBoxLabel[0].text = "[242858FF]" + strDec + "[-]"; break; } case MssageType.Exit_Msg_5: { m_ChildMsgObj[2].SetActive(true); m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.BeneFit_Msg_6: { m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = strMsg; break; } case MssageType.VIP_UnLock_Msg_7: { m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = strMsg; break; } case MssageType.NiuNiu_Exit_Tips: { m_ChildMsgObj[2].SetActive(true); m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.NiuNiu_UpHostFail_Tips: { m_ChildMsgObj[2].SetActive(true); m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.NiuNiu_SantchHost_Tips: { m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.Del_Friend_Msg: { m_UserID = ExData; m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.ForestDance_SnatchHost_Tips: { m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.ForestDance_Exit_Tips: { m_ChildMsgObj[2].SetActive(true); m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.Car_SantchHost_Tips: { m_ChildMsgObj[0].SetActive(true); m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]"; break; } case MssageType.Car_Exit_Tips: { m_ChildMsgObj[2].SetActive(true); m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]"; break; } } }
public void ShowMessageBox(string strMsg, MssageType type, byte RoomID = 0, uint ExData = 0) { m_Message.ShowMessageBox(strMsg, type, RoomID, ExData); }