public static void Show(string message) { UI_InfoMsg tmp = UI_InfoMsg.CreateInstance(); tmp.SetMessage(message); tmp.x = (GRoot.inst.width - tmp.width) / 2; tmp.y = (GRoot.inst.height - tmp.height) / 2; GRoot.inst.AddChild(tmp); }
void InitZhuangBtn() { m_sqxz.onClick.Add(() => { GameNetworkManager.Instance.shangZhuang(false); //申请上庄或者下庄 }); m_sqsz.onClick.Add(() => { //判断上庄限制 if (Global.user.dwMoney >= szLimit) { GameNetworkManager.Instance.shangZhuang(true); //申请上庄或者下庄 } else { double d = szLimit * 1.0 / 100; string msg = System.String.Format("上庄失败,上庄至少需要 {0:0.00} 元。", d); UI_InfoMsg.Show(msg); } }); }