Example #1
0
 public void onClickLeaveRoom(GameObject obj)
 {
     if (DDZRoomUIComponent.state == 1)
     {
         BoxUIHandler.instance.Show();
         BoxUIComponent box = BoxUIHandler.instance.getUIComponent();
         box.setType(1);
         box.setTitle("系统提示");
         box.setContent("现在退出游戏将会由笨笨哒机器人替你打完这局哦!");
         box.setCallback(exitGame);
     }
     else
     {
         KBEngineApp.app.player().baseCall("reqLeaveRoom");
     }
 }
Example #2
0
    public void onCashInfo(int retcode, int gold, int fee)
    {
        WaittingUIHandler.instance.UnShow();

        if (retcode == -1 || retcode == -2)
        {
            BoxUIHandler.instance.Show();
            BoxUIComponent box = BoxUIHandler.instance.getUIComponent();
            box.setType(2);
            box.setTitle("兑现失败");
            if (retcode == -2)
            {
                box.setContent("兑现金额过低!!!");
            }
            else
            {
                box.setContent("兑现后用户余额不能低于" + Users.instance.base_money + "元!!!");
            }
        }
        else
        {
            BoxUIHandler.instance.Show();
            string content = "兑现金额:" + gold + "\n" +
                             "实际到账:" + (gold - fee) + "\n" +
                             "支付宝:" + alipayInput.value + "\n" +
                             "手机号:" + Users.instance.Account;

            this.amount = int.Parse(amountInput.value);
            this.alipay = alipayInput.value;
            BoxUIComponent box = BoxUIHandler.instance.getUIComponent();
            box.setType(1);
            box.setTitle("请确认兑换信息");
            box.setContent(content);
            box.setCallback(onClickSend);
        }
    }