diff --git a/lua_probject/base_project/Game/View/MainView.lua b/lua_probject/base_project/Game/View/MainView.lua index b9979415..aa911e6a 100644 --- a/lua_probject/base_project/Game/View/MainView.lua +++ b/lua_probject/base_project/Game/View/MainView.lua @@ -47,7 +47,7 @@ function M:SetTuoGuanState() --if isShow==nil then return end if t and t>0 then - p:IsShowTGTips(true,t) + -- p:IsShowTGTips(true,t) else end @@ -80,10 +80,10 @@ function M:InitView(url, isHideIpAdds) if self._gcm_chat then if self._room.ban_chat2 then self._gcm_chat:GetController('sdk').selectedIndex = 1 - self._gcm_chat.visible = false + -- self._gcm_chat.visible = false end if self._room.room_config and self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then - self._gcm_chat.visible = false + -- self._gcm_chat.visible = false end end @@ -191,7 +191,7 @@ function M:InitView(url, isHideIpAdds) local gcm_chat = _view:GetChild('gcm_chat') --gcm_chat.displayObject.gameObject:SetActive(false) if gcm_chat then - gcm_chat.visible = false + -- gcm_chat.visible = false local _btn_chat = gcm_chat:GetChild('n1') _btn_chat.onClick:Add(function() if self.chat_view == nil then @@ -377,7 +377,9 @@ function M:InitView(url, isHideIpAdds) end if self._room.self_player.entrust then + self:MarkSelfTuoguan() + end @@ -998,6 +1000,12 @@ function M:OnUpdate() if pcall(func) then else + local success, result = pcall(func) + if success then + + else + error(result) + end self._gamectr = ControllerManager.GetController(GameController) if self._gamectr then self._gamectr:ResetConnect() diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua index 99b78503..a7bb03ef 100644 --- a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua @@ -296,7 +296,55 @@ local function __fillRoomItem(self, index, item, room) self.roominfo.room = room riv:GetChild('tex_room_id').text = room.id and '房间号:' .. room.id or '' local play = self.curGroup:getPlay(room.pid) - riv:GetChild('tex_room_name').text = play.name + riv:GetChild('tex_room_name').text = play.game_name + riv:GetController("mengzhu").selectedIndex = 1 + printlog("tex_room_name:") + if self.curGroup.lev==1 then + riv:GetController("mengzhu").selectedIndex = 0 + local jiesannum = riv:GetChild("jiesan_input") + riv:GetChild("btn_jiesan").onClick:Set( + function() + local _curren_msg = + MsgWindow.new( + self._root_view, + '确定解散该桌子吗?\r(解散该桌子没有任何结算信息,请谨慎操作)', + MsgWindow.MsgMode.OkAndCancel + ) + _curren_msg.onOk:Add( + function() + ViewUtil.ShowModalWait(self._root_view) + local fgCtr = ControllerManager.GetController(NewGroupController) + local roomid = jiesannum.text + fgCtr:FG_RemoveRoom( + self.curGroup.id, + roomid, + function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!') + return + else + riv:Dispose() + end + end + ) + end + ) + _curren_msg:Show() + end + ) + end + local exconfig = ExtendManager.GetExtendConfig(play.gameId) + local data = json.decode(play.config) + local r = {} + exconfig:FillRoomConfig(r, data) + local gameStr = "" + gameStr = "["..play.name.."]"..string.gsub(r.room_config:GetDes(), "\r", "") + riv:GetChild("wafashuoming").text = gameStr + self:InitRoomInfoView() riv:GetChild('btn_enter').onClick:Set( function() @@ -604,6 +652,7 @@ local function __fillRoomData(self) list_offline = {} if self.curGroup.lev < 3 then + pt(self.curRooms) self.lst_room.numItems = #self.curRooms else if self.curGroup.show_num > 0 and #self.curRooms > self.curGroup.show_num then @@ -1079,6 +1128,7 @@ function M:InitView(url) self.roomItems = {} self.lst_room = self._view:GetChild('lst_room') self.lst_room:SetVirtual() + self.lst_room.itemRenderer = function(index, item) __fillRoomItem(self, index, item) end @@ -1254,9 +1304,9 @@ function M:InitView(url) self.mng_view_Player:Show() end) self._view:GetChild('btn_gerenxinxi2').onClick:Set(function() - if not self.mng_view_Player then + -- if not self.mng_view_Player then self.mng_view_Player = GroupShowMemberInfoView.new(self.curGroup.id, self.curGroup) - end + -- end self.mng_view_Player:Show() end) diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupNumberInputView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupNumberInputView.lua index d82ffd6a..0ce47308 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupNumberInputView.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupNumberInputView.lua @@ -30,7 +30,7 @@ function GroupNumberInputView.new(blur_view,callback,itype,fag,com) itype = itype or InputType.Default local url = "ui://NewGroup/Win_FagInput" .. itype if com then url = com end - self._str_len_limit = itype == InputType.FagDeduct and 8 or 6 + self._str_len_limit = itype == InputType.FagDeduct and 10 or 8 self._type = itype self._fag = fag self:init(url) diff --git a/lua_probject/base_project/Game/View/PlayerInfoView.lua b/lua_probject/base_project/Game/View/PlayerInfoView.lua index c1af3f40..7d9ccf7b 100644 --- a/lua_probject/base_project/Game/View/PlayerInfoView.lua +++ b/lua_probject/base_project/Game/View/PlayerInfoView.lua @@ -29,6 +29,9 @@ function M.new(view, main_view, isHideIpAdds) self.isShowTGTimer = false self.currentTime = 0 self.totalTime = 0 + self.maxTime = 0 + self.starttimeflag = true + self.timer = nil --self.isShow = fasle self:init() return self @@ -98,42 +101,94 @@ function M:init() end end -function M:IsShowTGTips(isShow, time) - --printlog("isShowisShowisShow==== ",isShow," time ",time) - if time == nil then time = 0 end +function M:showmmm() + if self.totalTime>0 then + self.starttimeflag = false + self.totalTime = self.totalTime - 0.0165 + if self.totalTime<60 then + if self.PlayerTGBg and self.PlayerTGBg.displayObject.gameObject then + self.PlayerTGBg.displayObject.gameObject:SetActive(true) + end + if self.PlayerTGBorder and self.PlayerTGBorder.displayObject.gameObject then + self.PlayerTGBorder.displayObject.gameObject:SetActive(true) + end + if self.PlayerTGBg then + self.PlayerTGBg.max = self.maxTime + self.PlayerTGBg.value =self.maxTime - self.totalTime + end + if self.PlayerTGBorder then + self.PlayerTGBorder.max = self.maxTime + self.PlayerTGBorder.value = self.totalTime + end + + end + + else + if self.PlayerTGBg and self.PlayerTGBg.displayObject.gameObject then + self.PlayerTGBg.displayObject.gameObject:SetActive(false) + end + if self.PlayerTGBorder and self.PlayerTGBorder.displayObject.gameObject then + self.PlayerTGBorder.displayObject.gameObject:SetActive(false) + end + end + +end + +function M:IsShowTGTips(isShow, time) + printlog("isShowisShowisShow==== ",isShow," time ",time) + if time == nil then time = 0 end + self.totalTime = time self.isShowTGTimer = isShow if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then self.PlayerTGTips.displayObject.gameObject:SetActive(isShow) end if self.PlayerTGBg and self.PlayerTGBg.displayObject.gameObject then - self.PlayerTGBg.displayObject.gameObject:SetActive(isShow) + self.PlayerTGBg.displayObject.gameObject:SetActive(false) end if self.PlayerTGBorder and self.PlayerTGBorder.displayObject.gameObject then - self.PlayerTGBorder.displayObject.gameObject:SetActive(isShow) + self.PlayerTGBorder.displayObject.gameObject:SetActive(false) end self.currentTime = 0 + if isShow then if self.PlayerTGTips then self.PlayerTGTips.text = "开启托管剩余时间" .. time .. "s" end - if self.PlayerTGBg then + + self.maxTime = time + + if self.timer~=nil then + self.timer:Stop() + end + self.timer = FrameTimer.New(function() + self:showmmm() + end, 0.1, -1, false) + self.timer:Start() + + + + --[[ if self.PlayerTGBg then self.PlayerTGBg.max = time end if self.PlayerTGBorder then - self.PlayerTGBorder.max = time + self.PlayerTGBorder.max = time end - self.totalTime = time + self.totalTime = time]] --UpdateBeat:Remove(self.OnUpdate,self) --UpdateBeat:Add(self.OnUpdate,self) -- printlog("aaaaaaaaa111111111111111111111111111111") --TimerManager.RemoveTimer(self.OnUpdate) - TimerManager.AddTimer(self.OnUpdate, self) + -- TimerManager.AddTimer(self.OnUpdate, self) --printlog(self) else + + if self.timer~=nil then + self.timer:Stop() + end -- printlog("移除IsShowTGTips",self.isShow) --UpdateBeat:Remove(self.OnUpdate,self) - TimerManager.RemoveTimer(self.OnUpdate, self) + -- TimerManager.RemoveTimer(self.OnUpdate, self) end end diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXClearingView.lua index 7b48efeb..34c05fcb 100644 --- a/lua_probject/extend_project/extend/majiang/hongzhong/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXClearingView.lua @@ -112,7 +112,10 @@ function M:InitData(over, room, result, total_result, callback) local xiPaiCallBack = function() xipai.touchable = false self.xiPaiCtr.selectedIndex = 0 - ViewUtil.ErrorTip(1000000, "申请洗牌成功") + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + --ViewUtil.ErrorTip(1000000, "申请洗牌成功") end local _gamectr = ControllerManager.GetController(GameController) _gamectr:SendXiPaiAction(xiPaiCallBack) diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXClearingView.lua index 11b25aa3..682f80b6 100644 --- a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXClearingView.lua +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXClearingView.lua @@ -38,6 +38,8 @@ function M:InitData(over, room, result, total_result, callback) fanhuipaixing.visible=false local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + printlog("jefe xipa") + printlog(xpconfig) if xpconfig then self.xiPaiCtr.selectedIndex=1 else @@ -47,15 +49,21 @@ function M:InitData(over, room, result, total_result, callback) if over ~= 2 then local xipai=self._view:GetChild("btn_xipai") xipai.touchable=true + xipai.onClick:Add(function() - local xiPaiCallBack=function () - xipai.touchable=false - self.xiPaiCtr.selectedIndex=0 - ViewUtil.ErrorTip(1000000,"申请洗牌成功") - end - local _gamectr = ControllerManager.GetController(GameController) - _gamectr:SendXiPaiAction(xiPaiCallBack) - end) + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + + --ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then xipai.text="洗牌 积分x"..result.xipai_score end diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameController.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameController.lua index a2de4c84..0d56c753 100644 --- a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameController.lua +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameController.lua @@ -47,7 +47,6 @@ function M:SendXiPaiAction(callBack) end function M:OnEventXiPai(evt_data) - printlog("jefe OnEventXiPai ") if evt_data["result"]==0 then if self.XiPaiCallBack then self.XiPaiCallBack() diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua index 15392d92..764ac0e8 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua @@ -1062,7 +1062,7 @@ function M:EventInit() -- local piao = arg[2] -- local head_info = self._player_info[self:GetPos(1)] self._ctr_action.selectedIndex = 3 - -- self._ctr_state.selectedIndex = 1 + self.ctr_state.selectedIndex = 1 end) _gamectr:AddEventListener(RunFast_GameEvent.OnDaNiaoShow, function(...) diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua index 79bc0249..88a07ea2 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua @@ -51,7 +51,10 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) local xiPaiCallBack = function() xipai.touchable = false self.xiPaiCtr.selectedIndex = 0 - ViewUtil.ErrorTip(1000000, "申请洗牌成功") + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + --ViewUtil.ErrorTip(1000000, "申请洗牌成功") end local _gamectr = ControllerManager.GetController(GameController) _gamectr:SendXiPaiAction(xiPaiCallBack) diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua index d4f2e839..585da116 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/EXGameController.lua @@ -69,12 +69,14 @@ function M:OnEventDaNiaoTip(evt_data) ControllerManager.IsSendCard=true end ) + + + end function M:SendNiao(niao,callBack) local _data = {} _data["niaoflag"] = niao - printlog("niao flag" , niao) local _client = ControllerManager.GameNetClinet _client:send(RB_Protocol.GAME_EVT_SEND_NIAO, _data) self.NiaoTipsCallBack=callBack @@ -89,7 +91,6 @@ function M:OnEventDaNiao(evt_data) self.NiaoTipsCallBack=nil end end - printlog("OnEventDaNiao jefe") self._cacheEvent:Enqueue( function() DispatchEvent(self._dispatcher, FanPaoFa_GameEvent.OnEventDaNiao, seat,niao) diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua index 99abf162..1661062c 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/EXMainView.lua @@ -73,7 +73,7 @@ function M:InitView(url) if _room.playing or _room.curren_round > 0 then self:ReloadRoom() end - printlog("main 111") + self._view:GetController('jushu').selectedIndex = 1 self:setBtn() end @@ -169,6 +169,7 @@ function M:EventInit() local currentPlayer1=arg[1] local currentPlayer2=arg[2] self._popEvent = false + self._player_card_info[1]:HideDaNiao(0) if ( currentPlayer1 ) then local xipaiCB=function () @@ -224,10 +225,12 @@ function M:EventInit() local arg = {...} local seat = arg[1] local niao = arg[2] - printlog("-----AddEventListener niao----") + if self.seat==seat then + self._player_card_info[seat]:HideDaNiao(niao) + end local head_info = self._player_info[self:GetPos(seat)] - printlog("-----AddEventListener niao2----") head_info:UpdateNiao(niao) + end) @@ -252,8 +255,11 @@ function M:EventInit() p.hu_xi = 0 local _info = self._player_card_info[self:GetPos(p.seat)] _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) info:Ready(false) info._view:GetController('huxi').selectedIndex = 1 @@ -273,6 +279,7 @@ function M:EventInit() local card_info = self._player_card_info[1] card_info:UpdateIsOnClick(false) card_info:InitHandCard(true) + card_info:HideDaNiao(0) end ) diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/EXPlayerInfoView.lua index 0055bd85..50166b66 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/EXPlayerInfoView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/EXPlayerInfoView.lua @@ -16,6 +16,8 @@ function M:UpdateNiao(niao) if niao~=0 then self._view:GetController("niao").selectedIndex = 1 self._view:GetChild("niaotext").text = "打鸟"..niao + else + self._view:GetController("niao").selectedIndex = 0 end end diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/FanPaoFa_ResultView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/FanPaoFa_ResultView.lua index acc62358..c0236e55 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/FanPaoFa_ResultView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/FanPaoFa_ResultView.lua @@ -56,7 +56,7 @@ function M:InitData(over, room, result, total_result, callback) local xiPaiCallBack=function () xipai.touchable=false self.xiPaiCtr.selectedIndex=0 - ViewUtil.ErrorTip(1000000,"申请洗牌成功") + -- ViewUtil.ErrorTip(1000000,"申请洗牌成功") local _gamectr = ControllerManager.GetController(GameController) _gamectr:PlayerReady() @@ -148,8 +148,8 @@ function M:InitData(over, room, result, total_result, callback) ) -- 自动跳转 - - coroutine.start( + --[[ + coroutine.start( function() coroutine.wait(3) _overCtr.selectedIndex = 3 @@ -157,6 +157,7 @@ function M:InitData(over, room, result, total_result, callback) _sdkCtr.selectedIndex = 0 end ) + ]] self:AddClearItem(room, result, total_result.info_list, over) else @@ -217,7 +218,7 @@ function M:GetPos(room, seat) return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num) end function M:FillLiuJuItemData(room, data,item) - + --流局 local qipai_list = self._view:GetChild('qipai_listl') local _dipaiC = self._view:GetController('qipai') @@ -244,9 +245,7 @@ function M:FillLiuJuItemData(room, data,item) local btn_head = self._view:GetChild('btn_head') ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) end - - - + if data.info_list[i].seat == room.banker_seat and #data.info_list[i].hand_card > 0 then local card_list --[[if #data.info_list == 2 then @@ -267,6 +266,36 @@ function M:FillLiuJuItemData(room, data,item) local fztype = data.info_list[i].opCardList[k].type if fztype == RB_FZType.Kan then local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = data.info_list[i].opCardList[k].hu_xi + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + if fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '提' + cards:GetChild('card_huxi').text = data.info_list[i].opCardList[k].hu_xi + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + if fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = data.info_list[i].opCardList[k].hu_xi + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = data.info_list[i].opCardList[k].hu_xi for j = 1, 3 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) end @@ -274,8 +303,11 @@ function M:FillLiuJuItemData(room, data,item) end local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3) + for k = 1, #hand_card do local item = card_list:AddItemFromPool() + item:GetController('c1').selectedIndex = 2 + item:GetChild('card_huxi').text = hand_card[k].hu_xi for j = 1, #hand_card[k] do item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) end @@ -322,6 +354,10 @@ function M:FillLiuJuItemData(room, data,item) local fztype = info_list[i].opCardList[k].type if fztype == RB_FZType.Chi then local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetChild('card_1').icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) cards:GetChild('card_2').icon = @@ -330,34 +366,58 @@ function M:FillLiuJuItemData(room, data,item) self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3) elseif fztype == RB_FZType.Peng then local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi for j = 1, 3 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Kan then local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi for j = 1, 3 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '畏' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi for j = 1, 3 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Pao then local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi for j = 1, 4 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Ti then local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_type').text = '提' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi for j = 1, 4 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end + else + local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2) end end if #info_list[i].hand_card > 0 then @@ -375,7 +435,7 @@ function M:FillLiuJuItemData(room, data,item) end function M:FillItemData(room, data, item) - + --有赢结算 local dipai_list = self._view:GetChild('dipai_list') dipai_list:RemoveChildren(0, -1, true) if data.left_card ~= nil and #data.left_card > 0 then @@ -476,7 +536,7 @@ function M:FillItemData(room, data, item) end local card_list = self._view:GetChild('card_list') card_list:RemoveChildrenToPool() - if #win_data.cardList > 0 then + --[[ if #win_data.cardList > 0 then for i = 1, #win_data.cardList do -- 1 是对子 2 是三个的 local fztype = win_data.cardList[i].type @@ -524,7 +584,7 @@ function M:FillItemData(room, data, item) end end end - end + end]] for i = 1, #win_data.opCardList do local fztype = win_data.opCardList[i].type if fztype == RB_FZType.Chi then @@ -615,10 +675,25 @@ function M:FillItemData(room, data, item) cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) end + else + + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', win_data.opCardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', win_data.opCardList[i].card1) + end end - if #win_data.hand_card > 0 then + --[[ if #win_data.hand_card > 0 then for i = 1, #win_data.hand_card, 4 do local cards = card_list:AddItemFromPool() cards:GetChild('card_type').text = '散' @@ -635,14 +710,8 @@ function M:FillItemData(room, data, item) end end end - end - - else - - - + end]] end - printlog("输了:") item:RemoveChildrenToPool() for i = 1, #info_list do if info_list[i].is_win == false then @@ -677,9 +746,14 @@ function M:FillItemData(room, data, item) local card_list = player:GetChild('card_list') card_list:RemoveChildrenToPool() for k = 1, #info_list[i].opCardList do + local fztype = info_list[i].opCardList[k].type - if fztype == RB_FZType.Chi then + if fztype == RB_FZType.Chi then local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) cards:GetChild('card_2').icon = @@ -688,40 +762,67 @@ function M:FillItemData(room, data, item) self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3) elseif fztype == RB_FZType.Peng then local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetController('c1').selectedIndex = 1 for j = 1, 3 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Kan then local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetController('c1').selectedIndex = 1 for j = 1, 3 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '畏' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetController('c1').selectedIndex = 1 for j = 1, 3 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Pao then local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetController('c1').selectedIndex = 2 for j = 1, 4 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end elseif fztype == RB_FZType.Ti then local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '提' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetController('c1').selectedIndex = 1 for j = 1, 4 do cards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) end + else + + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = info_list[i].opCardList[k].hu_xi + cards:GetController('c1').selectedIndex = 0 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2) end end + if #info_list[i].hand_card > 0 then local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card, 3) for k = 1, #hand_card do local cards = card_list:AddItemFromPool() + cards:GetController('c1').selectedIndex = 2 for j = 1, #hand_card[k] do cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) @@ -731,7 +832,7 @@ function M:FillItemData(room, data, item) - self._view:GetChild('score_shu').text = '总胡息:' .. info_list[i].total_score + -- self._view:GetChild('score_shu').text = '总胡息:' .. info_list[i].total_score end end end diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua index c689ec32..f2b76fcc 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/PlayerCardInfoView.lua @@ -161,7 +161,7 @@ end function M:isAddFirst(seat) local isaddLast = false - if(DataManager.CurrenRoom.room_config.people_num ==3)then + --[[if(DataManager.CurrenRoom.room_config.people_num ==3)then if(DataManager.CurrenRoom.self_player.seat == 1)then if(seat == 2)then isaddLast = true @@ -177,7 +177,7 @@ function M:isAddFirst(seat) end elseif DataManager.CurrenRoom.room_config.people_num ==2 then isaddLast = true - end + end]] return isaddLast end diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/main/ZPPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/main/ZPPlayerSelfCardInfoView.lua index 50253673..a631a646 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/main/ZPPlayerSelfCardInfoView.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/main/ZPPlayerSelfCardInfoView.lua @@ -76,7 +76,7 @@ function M:ShwoDaNiao(niao) self.ctr_niao.selectedIndex = 1 end -function M:HideDaNiao() +function M:HideDaNiao(niao) self.ctr_niao.selectedIndex = 0 end diff --git a/lua_probject/extend_project/extend/zipai/fanpaofa/main/test.lua b/lua_probject/extend_project/extend/zipai/fanpaofa/main/test.lua index d7290e7c..7f7d9962 100644 --- a/lua_probject/extend_project/extend/zipai/fanpaofa/main/test.lua +++ b/lua_probject/extend_project/extend/zipai/fanpaofa/main/test.lua @@ -2,6 +2,7 @@ local funcs = require("functions") local CardCheck = require("CardCheck") + function LuaPrint(lua_table, limit, indent, step) step = step or 0 indent = indent or 0 @@ -159,6 +160,18 @@ player.fz_list = { } } -CardCheck.tingPai(player,room) +--CardCheck.tingPai(player,room) +function millisleep(ms) + local start = os.clock() + while os.clock()-start < ms / 1000 do + -- printlog(10-os.clock()-start) + printlog(Time.deltaTime) + end +end +function getMillitime() + return os.clock()*1000 +end + +millisleep(10000) diff --git a/wb_new_ui/.objs/metas/9n9stu2e/prgzab.info b/wb_new_ui/.objs/metas/9n9stu2e/prgzab.info index cff97378..280447be 100644 --- a/wb_new_ui/.objs/metas/9n9stu2e/prgzab.info +++ b/wb_new_ui/.objs/metas/9n9stu2e/prgzab.info @@ -3,6 +3,9 @@ "n8": { "hidden": true }, + "n48_nkur": { + "hidden": true + }, "n41_i3h6": { "hidden": true }, diff --git a/wb_new_ui/.objs/metas/9n9stu2e/prgzam.info b/wb_new_ui/.objs/metas/9n9stu2e/prgzam.info index 17bd2492..e1b6ae0b 100644 --- a/wb_new_ui/.objs/metas/9n9stu2e/prgzam.info +++ b/wb_new_ui/.objs/metas/9n9stu2e/prgzam.info @@ -2,6 +2,9 @@ "objectStatus": { "n54_kx91": { "collapsed": true + }, + "n55_nkur": { + "hidden": true } } } \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info b/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info index 4b92b16b..9e26dfee 100644 --- a/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info +++ b/wb_new_ui/.objs/metas/m7iejg46/ilon7i9l.info @@ -1,7 +1 @@ -{ - "objectStatus": { - "n55_vena": { - "hidden": true - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/v0j9abjy/gq7m8l.info b/wb_new_ui/.objs/metas/v0j9abjy/gq7m8l.info new file mode 100644 index 00000000..0571c22c --- /dev/null +++ b/wb_new_ui/.objs/metas/v0j9abjy/gq7m8l.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n32_e7qn": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/v0j9abjy/gq7m8u.info b/wb_new_ui/.objs/metas/v0j9abjy/gq7m8u.info new file mode 100644 index 00000000..bc99a01d --- /dev/null +++ b/wb_new_ui/.objs/metas/v0j9abjy/gq7m8u.info @@ -0,0 +1,7 @@ +{ + "objectStatus": { + "n28_e54q": { + "hidden": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/v6yvqp7w/f55qw4.info b/wb_new_ui/.objs/metas/v6yvqp7w/f55qw4.info index 9e26dfee..e0798fae 100644 --- a/wb_new_ui/.objs/metas/v6yvqp7w/f55qw4.info +++ b/wb_new_ui/.objs/metas/v6yvqp7w/f55qw4.info @@ -1 +1,7 @@ -{} \ No newline at end of file +{ + "objectStatus": { + "n89_ybf5": { + "collapsed": true + } + } +} \ No newline at end of file diff --git a/wb_new_ui/.objs/metas/v6yvqp7w/f55qwa.info b/wb_new_ui/.objs/metas/v6yvqp7w/f55qwa.info index 78463cc0..6a52560d 100644 --- a/wb_new_ui/.objs/metas/v6yvqp7w/f55qwa.info +++ b/wb_new_ui/.objs/metas/v6yvqp7w/f55qwa.info @@ -1,8 +1,5 @@ { "objectStatus": { - "n36_k3io": { - "collapsed": true - }, "n34_k3io": { "hidden": true }, diff --git a/wb_new_ui/.objs/metas/v6yvqp7w/xrdz1hd.info b/wb_new_ui/.objs/metas/v6yvqp7w/xrdz1hd.info new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/wb_new_ui/.objs/metas/v6yvqp7w/xrdz1hd.info @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/wb_new_ui/assets/Common/component/game/btn_ready.xml b/wb_new_ui/assets/Common/component/game/btn_ready.xml index f87edfd8..bbc28596 100644 --- a/wb_new_ui/assets/Common/component/game/btn_ready.xml +++ b/wb_new_ui/assets/Common/component/game/btn_ready.xml @@ -1,7 +1,7 @@ - + - + -