diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua index e93f3fb3..6cdef4a0 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua @@ -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()