同步版本修改,胡牌手牌更新顺序和小结算手牌排序
parent
7ee1038f09
commit
4678fa548a
|
|
@ -181,6 +181,8 @@ function M:fillResult0(room, peopleNum, result)
|
|||
|
||||
local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard")
|
||||
local handCardList = handCardItem:GetChild("list")
|
||||
--手牌排序
|
||||
table.sort(infoList.hand_card, ViewUtil.HandCardSort)
|
||||
handCardList:SetVirtual()
|
||||
handCardList.itemRenderer = function(index, obj)
|
||||
obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1])
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ function M:EventInit()
|
|||
local index = self:GetPos(win_seat)
|
||||
local info = self._player_card_info[index]
|
||||
self:RemoveCursor()
|
||||
info:UpdateHandCard(true, true)
|
||||
info:UpdateHandCard(false, true)
|
||||
|
||||
local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card_jiangxi")
|
||||
obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ function M:fillResult0(room, peopleNum, result)
|
|||
|
||||
local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard")
|
||||
local handCardList = handCardItem:GetChild("list")
|
||||
--手牌排序
|
||||
table.sort(infoList.hand_card, ViewUtil.HandCardSort)
|
||||
handCardList:SetVirtual()
|
||||
handCardList.itemRenderer = function(index, obj)
|
||||
obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1])
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ function M:fillResult0(room, peopleNum, result)
|
|||
|
||||
local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard")
|
||||
local handCardList = handCardItem:GetChild("list")
|
||||
--手牌排序
|
||||
table.sort(infoList.hand_card, ViewUtil.HandCardSort)
|
||||
handCardList:SetVirtual()
|
||||
handCardList.itemRenderer = function(index, obj)
|
||||
obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), infoList.hand_card[index + 1])
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ function M:EventInit()
|
|||
local index = self:GetPos(win_seat)
|
||||
local info = self._player_card_info[index]
|
||||
self:RemoveCursor()
|
||||
info:UpdateHandCard(true, true)
|
||||
info:UpdateHandCard(false, true)
|
||||
|
||||
local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card_jiangxi")
|
||||
obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card
|
||||
|
|
|
|||
|
|
@ -179,26 +179,20 @@ function M:fillResult0(room, peopleNum, result)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
local handCardItem = allCardsList:AddItemFromPool("ui://Main_Majiang/Comp_HandCard")
|
||||
local handCardList = handCardItem:GetChild("list")
|
||||
--手牌排序
|
||||
table.sort(infoList.hand_card, ViewUtil.HandCardSort)
|
||||
handCardList:SetVirtual()
|
||||
--去除赢家手牌标志
|
||||
local flag_remove = infoList.is_win
|
||||
local num_add = 0
|
||||
handCardList.itemRenderer = function(index, obj)
|
||||
if infoList.win_card == infoList.hand_card[index + 1] and flag_remove then
|
||||
flag_remove = false
|
||||
num_add = 1
|
||||
end
|
||||
obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(),
|
||||
infoList.hand_card[index + num_add + 1])
|
||||
infoList.hand_card[index + 1])
|
||||
if room.jing == infoList.hand_card[index + 1] then
|
||||
obj:GetController('jing').selectedIndex = 1
|
||||
end
|
||||
end
|
||||
handCardList.numItems = infoList.is_win and handInfoNum - 1 or handInfoNum
|
||||
handCardList.numItems = handInfoNum
|
||||
allCardsList.width = 172 * fzInfoNum + 60 + (handInfoNum - 1) * 56 + 36 * (fzInfoNum)
|
||||
|
||||
if infoList.seat == room.self_player.seat then
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ function M:EventInit()
|
|||
local index = self:GetPos(win_seat)
|
||||
local info = self._player_card_info[index]
|
||||
self:RemoveCursor()
|
||||
info:UpdateHandCard(true, true)
|
||||
info:UpdateHandCard(false, true)
|
||||
|
||||
local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card_jiangxi")
|
||||
obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card
|
||||
|
|
|
|||
Loading…
Reference in New Issue