他们胡牌特效少修复

master
罗家炜 2025-04-25 17:49:33 +08:00
parent ae1c6dcc9f
commit 2407d98c7d
1 changed files with 12 additions and 1 deletions

View File

@ -382,7 +382,7 @@ function M:EventInit()
local player = _room:GetPlayerBySeat(win_seat)
if win_seat ~= _room.self_player.seat then
url = "ui://Main_Majiang/别人胡"
pNode = info._mask_liangpai
pNode = info._view
elseif win_seat == _room.self_player.seat then
url = "ui://Main_Majiang/自己胡牌"
pNode = self._view
@ -451,11 +451,13 @@ function M:EventInit()
end)
_gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...)
print("lingmengniaoadd")
local arg = { ... }
self._popEvent = false
local list = arg[1]
local start_seat = arg[2]
-- ViewUtil.PlaySound("NanCheng_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3")
print("lingmengniaoadd2")
coroutine.start(self.RunNiao, self, list, start_seat)
end)
@ -832,13 +834,18 @@ function M:OnFangziAction(...)
end
function M:RunNiao(list, start_seat)
print("lingmengniao1")
local _room = self._room
--local _niao_View = self._niao_View
self._niao_View = UIPackage.CreateObject("Extend_MJ_NanCheng", "Panel_Birds")
print("lingmengniao2")
self._view:AddChild(self._niao_View)
self._niao_View:Center()
local _niao_View = self._niao_View
local list_niao_card = self._niao_View:GetChild("Lst_birds")
print("lingmengniao3")
list_niao_card:RemoveChildrenToPool()
for i = 1, #list do
--添加背面的麻將
@ -846,6 +853,8 @@ function M:RunNiao(list, start_seat)
item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00")
item:GetChild("tex_score").text = "+" .. list[i].score
end
print("lingmengniao4")
for i = 1, #list do
--顯示正面
local item = list_niao_card:GetChildAt(i - 1)
@ -855,6 +864,8 @@ function M:RunNiao(list, start_seat)
item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. card)
if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end
end
print("lingmengniao5")
coroutine.start(function()
coroutine.wait(1)
_niao_View:Dispose()