private void GetInTea(object msg) { Dictionary <string, object> dic = (Dictionary <string, object>)msg; long value = (long)dic["mstatus"]; if (value != 4) { YxWindow obj = CreateOtherWindow("TeaPanel"); TeaPanel panel = obj.GetComponent <TeaPanel>(); panel.UpdateView(dic); panel.SetTeaCode(_currentRoomId); Util.SetString("TeaId", _currentRoomId.ToString()); } else { YxMessageBox.Show(string.Format("{0}不存在", CurrentName)); } }
private void GetInTea(object msg) { Dictionary <string, object> dic = (Dictionary <string, object>)msg; long value = (long)dic["mstatus"]; if (value != 4) { string tea_name = (string)dic["name"]; YxWindow obj = CreateOtherWindow("TeaPanel"); TeaPanel panel = obj.GetComponent <TeaPanel>(); panel.UpdateView(dic); if (dic.ContainsKey("only_owner")) { panel.onlyOwner = Convert.ToInt32(dic["only_owner"]); } else { panel.onlyOwner = -1; } panel.CasePower((int)value); if (dic.ContainsKey("roomNum")) { panel.roomNum = Convert.ToInt32(dic["roomNum"]); } panel.SetTeaName(tea_name); panel.SetTeaCode(int.Parse(GetCurRoomId())); panel.TeaState = (int)value; PlayerPrefs.SetString(SaveTeaId, GetCurRoomId()); Close(); } else { YxMessageBox.Show("茶馆不存在"); } Clear(); }