跑得快临时

master
罗家炜 2025-04-29 14:24:48 +08:00
parent 01d428b954
commit f23654dfe9
4 changed files with 30 additions and 11 deletions

View File

@ -930,12 +930,12 @@ function M:EventInit()
card_info:UpdateHandPoker(player.cards, false, true) card_info:UpdateHandPoker(player.cards, false, true)
card_info:SetRemainCardNumber(false) card_info:SetRemainCardNumber(false)
card_info._view_Out:RemoveChildrenToPool() card_info._view_resultOut:RemoveChildrenToPool()
card_info.ctr_outpoker.selectedIndex = 1 card_info._ctr_resultOut.selectedIndex = 1
for i = 1, #player.handCards do for i = 1, #player.handCards do
local child_card = card_info._view_Out:AddItemFromPool() local child_card = card_info._view_resultOut:AddItemFromPool()
card_info:FillPoker(child_card, "", player.handCards[i]) card_info:FillPoker(child_card, "", nil, player.handCards[i])
coroutine.wait(0.3) coroutine.wait(0.2)
end end
end end
end end

View File

@ -41,6 +41,8 @@ function M:init()
------------------------------lingmeng------------------------ ------------------------------lingmeng------------------------
self._view_Out = self._view:GetChild('List_Out') self._view_Out = self._view:GetChild('List_Out')
self._view_resultOut = self._view:GetChild('list_resultOut')
self._ctr_resultOut = self._view:GetController('resultOut')
-------------------------------------------------------------- --------------------------------------------------------------
end end
@ -332,14 +334,16 @@ function M:SetRemainCardNumber(isPlay)
--end --end
end end
function M:FillPoker(poker, prefix, num) function M:FillPoker(poker, prefix, num, code)
num = self:ChangeCodeByTo(num) if num ~= nil then
local suffix = num == 310 and (DataManager.CurrenRoom.pai == 0 and "_1" or "_2") or "" code = self:ChangeCodeByTo(num)
num = num == 1 and "00" or num end
local suffix = code == 310 and (DataManager.CurrenRoom.pai == 0 and "_1" or "_2") or ""
code = code == 1 and "00" or code
if not poker.icon then if not poker.icon then
poker:GetChild('icon').url = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, num, suffix) poker:GetChild('icon').url = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, code, suffix)
else else
poker.icon = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, num, suffix) poker.icon = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, code, suffix)
end end
end end
@ -417,6 +421,7 @@ function M:Clear()
self.hand_card_list:RemoveChildren(0, -1, true) self.hand_card_list:RemoveChildren(0, -1, true)
self._mask_liangpai:RemoveChildren(0, -1, true) self._mask_liangpai:RemoveChildren(0, -1, true)
self._view_Out:RemoveChildren(0, -1, true) self._view_Out:RemoveChildren(0, -1, true)
self._view_resultOut:RemoveChildren(0, -1, true)
end end
function M:Destroy() function M:Destroy()

View File

@ -24,6 +24,7 @@ end
function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
ResultView.init(self, url, true) ResultView.init(self, url, true)
local room = DataManager.CurrenRoom
self._view:GetController('over').selectedIndex = over self._view:GetController('over').selectedIndex = over
self._view:GetChild('btn_nextRound').onClick:Set(function() self._view:GetChild('btn_nextRound').onClick:Set(function()
@ -35,6 +36,19 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
self._view:GetChild('btn_closeRound').onClick:Set(function() self._view:GetChild('btn_closeRound').onClick:Set(function()
ViewManager.ChangeView(ViewManager.View_Family) ViewManager.ChangeView(ViewManager.View_Family)
end) end)
-- self._view:GetController('win').selectedIndex = win_seat == room.self_player.seat
-- local over0List = self._view:GetChild('list_over0')
-- over0List:SetVirtual()
-- over0List.itemRenderer = function(index, obj)
-- local info = data[index + 1]
-- local playerInfo = room:GetPlayerBySeat(info.seat)
-- obj:GetChild('name').text = playerInfo.nick_name
-- obj:GetChild('residue').text = #info.handCards
-- obj:GetChild('bomb').text = playerInfo.nick_name
-- obj:GetChild('name').text = playerInfo.nick_name
-- end
end end
return M return M