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