void balancCallBack(object obj) { int result = (int)obj; if (result == Config.CODE_SUCCESS) { Txt_Money_My.text = UserModel.getInstance().UserVo.money.ToString(); Txt_Charge.text = ""; int ownMoney = SetModel.getInstance().setVo.money; //PopMessageManager.show("结算获得:" + ownMoney); PopAlertManager.show("", "结算获得:" + ownMoney); //Application.LoadLevel(SceneConfig.SceneLevelFight); } }
/** * 结算处理 * */ private void Btn_BalancClick(GameObject go) { //在这里监听按钮的点击事件 if (go == Btn_Balance.gameObject) { int myMoney = UserModel.getInstance().UserVo.money; if (myMoney > 0) { SetModel.getInstance().BalancAction(balancCallBack); } else { PopMessageManager.show("当前账户余额必须大于0"); } } }
/** * 充值处理 * */ private void Btn_ChargeClick(GameObject go) { //在这里监听按钮的点击事件 if (go == Btn_Charge.gameObject) { int Money = int.Parse(Txt_Charge.text); if (Money > 0) { SetModel.getInstance().ChargeAction(Money, betChargeCallBack); } else { PopMessageManager.show("充值金额必须大于0"); } } }