diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua index 29673512..5063f4ae 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua @@ -221,10 +221,91 @@ function M:EventInit() _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) print("lingmeng witness ZPResult1") + self._popEvent = false + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + -- if liuju then + -- local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + -- self._view:AddChild(le) + -- le:Center() + -- le:GetTransition("t0"):Play() + -- coroutine.start(function() + -- coroutine.wait(1) + -- le:Dispose() + -- end) + -- end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + print("lingmeng witness ZPResult2") + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + -- info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num >= 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + print("lingmeng witness ZPResult3") + + -- self._player_card_info[1]:ShowHuTip() end) _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) print("lingmeng witness ZPResult2") + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) end) _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function()