From bd2ae0c35bf8a823e74b429cd653fdb71fe4aa7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Sat, 26 Apr 2025 14:27:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=BE=E7=BD=AE=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=A2=AB=E4=B8=80=E9=94=AE=E4=B8=8B=E6=B4=BE=E9=81=AE?= =?UTF-8?q?=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/majiang/nancheng/EXGameInfo.lua | 268 +++++++++--------- .../main_majiang/ui/main_majiang_fui.bytes | Bin 327101 -> 327101 bytes 2 files changed, 134 insertions(+), 134 deletions(-) diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXGameInfo.lua index a3a8d0d0..f340d71a 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXGameInfo.lua @@ -4,197 +4,197 @@ local M = EXGameInfo function EXGameInfo.new(blur_view) - setmetatable(M, { __index = IGameInfo }) - local self = setmetatable({}, { __index = M }) - self.class = "EXGameInfo" - UIPackage.AddPackage("extend/majiang/nancheng/ui/Info_MJ_NanCheng") - return self + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/nancheng/ui/Info_MJ_NanCheng") + return self end function M:FillData() - self._maxPlayer = 4 -- 默认玩家人数 - self._roundChoice = 3 -- 回合选项数 - self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_NanCheng/Label_Detail_83") + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_NanCheng/Label_Detail_83") - local jiangmaSlider = self._config:GetChild("n92") - jiangmaSlider.onChanged:Set(function() - self._config:GetChild("n93").text = string.format("奖%s马", Mathf.Round(jiangmaSlider.value) * 2) - end) - -- if oldGameVersion == 2 then - -- self._config:GetController("xipai").selectedIndex = 0 + local jiangmaSlider = self._config:GetChild("n92") + jiangmaSlider.onChanged:Set(function() + self._config:GetChild("n93").text = string.format("奖%s马", Mathf.Round(jiangmaSlider.value) * 2) + end) + -- if oldGameVersion == 2 then + -- self._config:GetController("xipai").selectedIndex = 0 - -- self.xipaiValueText = self._config:GetChild('xipaifen') - -- self.xipaiValueText.text = 1 - -- self.xipaiValue = 1 + -- self.xipaiValueText = self._config:GetChild('xipaifen') + -- self.xipaiValueText.text = 1 + -- self.xipaiValue = 1 - -- self.anchouValueText = self._config:GetChild('anchoufen') - -- self.anchouValueText.text = 1 - -- self.anchouValue = 1 + -- self.anchouValueText = self._config:GetChild('anchoufen') + -- self.anchouValueText.text = 1 + -- self.anchouValue = 1 - -- local btn_cr = self._config:GetChild('sdsrbtn') - -- btn_cr.onClick:Set( - -- function() - -- local gniv = GroupNumberInputView_Game.new(nil, function(num) - -- local value = limit - -- if otype == 1 then - -- value = value + ad2d(num) - -- elseif otype == -1 then - -- value = value - ad2d(num) - -- else - -- value = ad2d(num) - -- end + -- local btn_cr = self._config:GetChild('sdsrbtn') + -- btn_cr.onClick:Set( + -- function() + -- local gniv = GroupNumberInputView_Game.new(nil, function(num) + -- local value = limit + -- if otype == 1 then + -- value = value + ad2d(num) + -- elseif otype == -1 then + -- value = value - ad2d(num) + -- else + -- value = ad2d(num) + -- end - -- if value < 0 then - -- ViewUtil.ErrorTip(1, "输入数据异常!") - -- end + -- if value < 0 then + -- ViewUtil.ErrorTip(1, "输入数据异常!") + -- end - -- self.xipaiValueText.text = value / 1000 - -- self.xipaiValue = value / 1000 - -- end, 3, nil) - -- gniv:Show() - -- end - -- ) + -- self.xipaiValueText.text = value / 1000 + -- self.xipaiValue = value / 1000 + -- end, 3, nil) + -- gniv:Show() + -- end + -- ) - -- local btn_cr2 = self._config:GetChild('anchoubtn') - -- btn_cr2.onClick:Set( - -- function() - -- local gniv = GroupNumberInputView_Game.new(nil, function(num) - -- local value = limit - -- if otype == 1 then - -- value = value + ad2d(num) - -- elseif otype == -1 then - -- value = value - ad2d(num) - -- else - -- value = ad2d(num) - -- end + -- local btn_cr2 = self._config:GetChild('anchoubtn') + -- btn_cr2.onClick:Set( + -- function() + -- local gniv = GroupNumberInputView_Game.new(nil, function(num) + -- local value = limit + -- if otype == 1 then + -- value = value + ad2d(num) + -- elseif otype == -1 then + -- value = value - ad2d(num) + -- else + -- value = ad2d(num) + -- end - -- if value < 0 then - -- ViewUtil.ErrorTip(1, "输入数据异常!") - -- end + -- if value < 0 then + -- ViewUtil.ErrorTip(1, "输入数据异常!") + -- end - -- self.anchouValueText.text = value / 1000 - -- self.anchouValue = value / 1000 - -- end, 3, nil) - -- gniv:Show() - -- end - -- ) - -- end + -- self.anchouValueText.text = value / 1000 + -- self.anchouValue = value / 1000 + -- end, 3, nil) + -- gniv:Show() + -- end + -- ) + -- end end local _help_url = "ui://Info_MJ_NanCheng/Com_help" function M:GetHelpUrl() - return _help_url + return _help_url end local _icon_url = "ui://Info_MJ_NanCheng/icon" function M:GetIconUrl() - return _icon_url + return _icon_url end local _icon_url1 = "ui://Info_MJ_NanCheng/icon1" function M:GetIconUrl1() - return _icon_url1 + return _icon_url1 end local _play_list = {} function M:GetPlayList() - return _play_list + return _play_list end function M:SelectedConfigData() - local _config = self._config - local round = _config:GetController("round").selectedIndex + 1 - local people = _config:GetController("peopleNum").selectedIndex + 2 + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("peopleNum").selectedIndex + 2 - local zimo = _config:GetController("ZiMo").selectedIndex - local shaozhuang = _config:GetController("ShaoZhuang").selectedIndex - local fengding = _config:GetController("FengDing").selectedIndex - local zuoma = _config:GetController("ZuoMa").selectedIndex - local zhuanwan = _config:GetController("ZhuanWan").selectedIndex - local jiahu = _config:GetController("JiaHu").selectedIndex + local zimo = _config:GetController("ZiMo").selectedIndex + local shaozhuang = _config:GetController("ShaoZhuang").selectedIndex + local fengding = _config:GetController("FengDing").selectedIndex + local zuoma = _config:GetController("ZuoMa").selectedIndex + local zhuanwan = _config:GetController("ZhuanWan").selectedIndex + local jiahu = _config:GetController("JiaHu").selectedIndex - local jiangma = Mathf.Round(_config:GetChild("n92").value) + local jiangma = Mathf.Round(_config:GetChild("n92").value) - local xi_pai = false - local xi_paifen = 0 - if _config:GetChild("xipai") then - xi_pai = _config:GetChild("xipai").selected - end + local xi_pai = false + local xi_paifen = 0 + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end - ------ - local _data = {} - _data["opt"] = round - _data["maxPlayers"] = people + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people - _data["zimo"] = zimo - _data["shaozhuang"] = shaozhuang - _data["fengding"] = fengding - _data["zuoma"] = zuoma - _data["zhuanwan"] = zhuanwan - _data["jiahu"] = jiahu + _data["zimo"] = zimo + _data["shaozhuang"] = shaozhuang + _data["fengding"] = fengding + _data["zuoma"] = zuoma + _data["zhuanwan"] = zhuanwan + _data["jiahu"] = jiahu - _data["jiangma"] = jiangma - _data['xi_pai'] = xi_pai + _data["jiangma"] = jiangma + _data['xi_pai'] = xi_pai - local xi_pai_score = 0 - local an_chou_score = 0 - -- if oldGameVersion == 2 then - -- xi_pai_score = self.xipaiValue - -- an_chou_score = self.anchouValue - -- end + local xi_pai_score = 0 + local an_chou_score = 0 + -- if oldGameVersion == 2 then + -- xi_pai_score = self.xipaiValue + -- an_chou_score = self.anchouValue + -- end - _data['xi_pai_score'] = xi_pai_score * 1000 - _data['an_chou_score'] = an_chou_score * 1000 + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 - return _data + return _data end function M:LoadConfigData(data) - --printlog("加载房间配置=========>>>") - --pt(data) - local _config = self._config - _config:GetController("round").selectedIndex = data.opt - 1 - _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 - _config:GetController("fengding").selectedIndex = data.fengding + _config:GetController("fengding").selectedIndex = data.fengding - _config:GetController("wanfa").selectedIndex = data.wanfa - _config:GetChild("btn_qidui").selected = data.qiduijiafan - _config:GetChild("btn_shoudailong").selected = data.shoudailongjiafan - _config:GetChild("btn_loudilong").selected = data.loudilongjiafan - _config:GetChild("btn_bunengchi").selected = data.bunengchi + _config:GetController("wanfa").selectedIndex = data.wanfa + _config:GetChild("btn_qidui").selected = data.qiduijiafan + _config:GetChild("btn_shoudailong").selected = data.shoudailongjiafan + _config:GetChild("btn_loudilong").selected = data.loudilongjiafan + _config:GetChild("btn_bunengchi").selected = data.bunengchi - _config:GetChild("btn_doudizhu").selected = data.doudizhu - _config:GetChild("btn_doudizhufanbei").selected = data.doudizhufanbei + _config:GetChild("btn_doudizhu").selected = data.doudizhu + _config:GetChild("btn_doudizhufanbei").selected = data.doudizhufanbei - if _config:GetChild("xipai") then - _config:GetChild("xipai").selected = data.xi_pai - end + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end - -- if oldGameVersion == 2 then - -- self.xipaiValueText.text = data.xi_pai_score / 1000 - -- self.xipaiValue = data.xi_pai_score / 1000 + -- if oldGameVersion == 2 then + -- self.xipaiValueText.text = data.xi_pai_score / 1000 + -- self.xipaiValue = data.xi_pai_score / 1000 - -- self.anchouValueText.text = data.an_chou_score / 1000 - -- self.anchouValue = data.an_chou_score / 1000 - -- end + -- self.anchouValueText.text = data.an_chou_score / 1000 + -- self.anchouValue = data.an_chou_score / 1000 + -- end end function M:LoadConfigToDetail(data) - local configData = json.decode(data) - local returnString = string.format("人数%s人,%s马%s%s%s%s%s%s,%s", configData.maxPlayers, - configData.jiangma and string.format("奖%d", configData.jiangma) or "不奖", configData.shaozhuang and ",有烧庄" or "", - configData.zuoma and ",庄家坐马" or "", - configData.zimo and ",只能自摸" or ",自摸可点炮", - configData.tuoguan and string.format(",%d秒后自动托管", configData.tuoguan_active_time) or "不能托管", - configData.jiahu and ",可以假胡" or "", configData.fengding and ",封顶20炮" or "", - configData.zhuanwan and "大转弯" or "小转弯") - return returnString + local configData = json.decode(data) + local returnString = string.format("人数%s人,%s马%s%s%s%s%s%s,%s", configData.maxPlayers, + configData.jiangma and string.format("奖%d", configData.jiangma) or "不奖", configData.shaozhuang and ",有烧庄" or "", + configData.zuoma and ",庄家坐马" or "", + configData.zimo and ",只能自摸" or ",自摸可点炮", + configData.tuoguan and string.format(",%d秒后自动托管", configData.tuoguan_active_time) or ",不能托管", + configData.jiahu and ",可以假胡" or "", configData.fengding and ",封顶20炮" or "", + configData.zhuanwan and "大转弯" or "小转弯") + return returnString end return M diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes index b4cef47ccf333b0ce83ce6f7af8d30584ea512f2..7cd047092183847daadd07eb5dff1114cf887467 100644 GIT binary patch delta 204 zcmdn{TX^qp;SGmpP8OUc&g{VCI9Yp^)$|fWX5ne9j4X^!lW)&7n||szqx9y6S-Dv- zMbkrB8L_HrU&YD@#7x^)u`*{GO;5C77H4i}a-3dm!3G4Lc7r6$HF=H$5Km*+8XufU&YFtX*9jWkXe`&Xeej<^m+?sv+2SX%;L-)Oit5vEtsJi zE?6*czhJ@gPhQR-J}))Zn1LhD#4tWNyDW);C$T6sF+MRT$0ff!Z~L1FmRqHQ#+GnZ O24Gd&ub*RirUw9n&qz@K