/// <summary> /// 发送操作指令 /// </summary> /// <param name="req"></param> public void SendGameOpt(NNSendGameOpt req) { NetProcess.SendRequest <NNSendGameOpt>(req, NNProtoIdMap.CMD_SendGameOpt, (Msg) => { CommonRecieveProto ack = Msg.Read <CommonRecieveProto>(); if (ack.code == 1) { } else { GameUtils.ShowErrorTips(ack.code); } }); }
/// <summary> /// 下注和抢庄的点击 /// </summary> /// <param name="go"></param> public void OnBetQiangBtnItemClick(GameObject go) { NNSendGameOpt req = new NNSendGameOpt(); int index = int.Parse(go.name.Remove(go.name.Length - 1, 1)); if (go.name.EndsWith("Q")) {//抢庄 req.ins = (int)eNNOpt.QZ; req.qzValue = NiuniuModel.Inst.mQzListValue[index - 1]; } else //下注 { req.ins = (int)eNNOpt.XZ; req.xzValue = NiuniuModel.Inst.mXzListValue[index - 1]; } Global.Inst.GetController <NNGameController>().SendGameOpt(req); }
/// <summary> /// 亮牌点击 /// </summary> public void OnLiangCardClick() { if (NiuniuModel.Inst.mLookCard) { NNSendGameOpt req = new NNSendGameOpt(); req.ins = (int)eNNOpt.LP; Global.Inst.GetController <NNGameController>().SendGameOpt(req); } else { SetCuoBtnState(false); Global.Inst.GetController <NNGameController>().mView.TurnSelfCards(); NiuniuModel.Inst.mLookCard = true; UILabel label = mLookCardBtn.GetComponentInChildren <UILabel>(); if (label != null) { label.text = "亮牌"; } } }