void onChargeBtnClick() { PlayerDataModule pdm = ModuleManager.Instance.FindModule <PlayerDataModule>(); if (pdm == null) { return; } int cost = (int)ConfigManager.GetVal <int>(ConfigItemKey.FUND_CHARGE_NUM); if (pdm.GetProceeds(ProceedsType.Money_RMB) < cost) { string str = StringHelper.GetString("fund_no_money", FontColor.Red); PopTipManager.Instance.AddNewTip(str); return; } if (pdm.GetFundTimeSec() < 0) { string str = StringHelper.GetString("fund_over", FontColor.Red); PopTipManager.Instance.AddNewTip(str); return; } FundJoinParam param = new FundJoinParam(); param.opType = Message.FUND_OP_TYPE.FUND_BUY; Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_FUND, param); }
protected override void OnRequest(request_totalcharge_op param, object userdata) { if (userdata is FundJoinParam) { FundJoinParam clickParam = userdata as FundJoinParam; param.op_type = (int)clickParam.opType; } }