From 9b42366d4b5ab8296ecb959d09f4a84609e05a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Fri, 25 Apr 2025 11:11:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=83=E7=A2=B0=E6=9D=A0=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MJPlayerSelfCardInfoView_jiangxi.lua | 2 - .../extend/majiang/nancheng/EXMainView.lua | 10 ++- .../majiang/MJPlayerCardInfoView_jiangxi.lua | 15 +--- .../MJPlayerSelfCardInfoView_jiangxi.lua | 69 +++++++++---------- 4 files changed, 42 insertions(+), 54 deletions(-) diff --git a/lua_probject/extend_project/extend/majiang/lichuan/MJPlayerSelfCardInfoView_jiangxi.lua b/lua_probject/extend_project/extend/majiang/lichuan/MJPlayerSelfCardInfoView_jiangxi.lua index b3efe011..ff826589 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/MJPlayerSelfCardInfoView_jiangxi.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/MJPlayerSelfCardInfoView_jiangxi.lua @@ -51,8 +51,6 @@ function M:init() self._ctr_getCard = self._view:GetController('getCard') self._ctr_seletedGet = self._view:GetController('seletedGetCard') - - ViewUtil.ErrorTip(nil, self._view:GetChild('n39') == nil and "11111" or "2222") end function M:ShowHuTip(card_list) diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua index 39e58fd1..d41e63c4 100644 --- a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua @@ -715,7 +715,7 @@ function M:OnFangziAction(...) local index = arg[3] printlog("OnFangziAction") local info = _player_card_info[self:GetPos(player.seat)] - local pNode = info._mask_liangpai + -- local pNode = info._mask_liangpai local effect = UIPackage.CreateObject("Extend_MJ_NanCheng", "FzEffect") if fz.type == FZType.Peng then self:PlaySound("NanCheng_MJ", player.self_user.sex, "peng" .. math.random(1, 3)) @@ -734,7 +734,7 @@ function M:OnFangziAction(...) end effect.touchable = false effect:GetTransition("t2"):Play() - pNode:AddChild(effect) + -- pNode:AddChild(effect) coroutine.start(function() coroutine.wait(0.3) self._popEvent = true @@ -749,10 +749,14 @@ function M:OnFangziAction(...) local fs_info = _player_card_info[self:GetPos(fz.from_seat)] fs_info:UpdateOutCardList() end + print("lingmengfz1") info:UpdateFzList(fz, index, true) + print("lingmengfz2") local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi - printlog(getcard) + print("lingmengfz3") + print(getcard) info:UpdateHandCard(getcard) + print("lingmengfz4") self:__CloseTip() end diff --git a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua index 2abefb87..a97211a6 100644 --- a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua +++ b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua @@ -214,22 +214,11 @@ local function getPos(my_seat, other_seat, total) end function M:UpdateFzList(fz, index, show_card) - local fz_list = self._mask_data['fz_list'] local FZame = self._viewText_cardInfo['FZ_Card'] index = index or 0 show_card = show_card or nil - local outCard - - -- if self._view_outCardList.numItems < #outlist - 1 then - -- for i = 1, #outlist - 1 do - -- outcard = self._view_outCardList:AddItemFromPool() - -- -- end - -- self:fillCard2(outcard, outCardName, outlist[i]) - -- end - -- end - - outCard = self._view_FZList:AddItemFromPool() + local outCard = self._view_FZList:AddItemFromPool() if fz.type == FZType.Chi then for i = 1, 3 do @@ -251,6 +240,8 @@ function M:UpdateFzList(fz, index, show_card) self:fillCard2(FZCard, FZame, fz.card) if fz.type == FZType.Gang_An then self:fillCard2(FZCard, FZame, '00') + elseif fz.type == FZType.Gang_Peng then + self._view_FZList:RemoveChildAt(self._view_FZList.numItems - 2) end end end diff --git a/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView_jiangxi.lua b/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView_jiangxi.lua index 36af4d1a..e99de2dc 100644 --- a/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView_jiangxi.lua +++ b/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView_jiangxi.lua @@ -179,46 +179,41 @@ function M:__OnClickGetCard(context) end end -function M:UpdateFzList(fz, index, show_card) - local isFour = false - if fz.type == FZType.Gang or fz.type == FZType.Gang_An or fz.type == FZType.Gang_Peng then - isFour = true - end +-- function M:UpdateFzList(fz, index, show_card) +-- -- local FZame = self._viewText_cardInfo['FZ_Card'] +-- local FZame = "202_" +-- index = index or 0 +-- show_card = show_card or nil - -- local FZame = self._viewText_cardInfo['FZ_Card'] - local FZame = "202_" - index = index or 0 - show_card = show_card or nil +-- local outCard - local outCard +-- outCard = self._view_FZList:AddItemFromPool() - outCard = self._view_FZList:AddItemFromPool() - - if fz.type == FZType.Chi then - for i = 1, 3 do - local FZCard = outCard:GetChild(string.format("Comp_Card%d", i)) - self:fillCard2(FZCard, FZame, fz.opcard[i]) - end - else - local ctr_Four = outCard:GetController("isFour") - for i = 1, 3 do - local FZCard = outCard:GetChild(string.format("Comp_Card%d", i)) - self:fillCard2(FZCard, FZame, fz.card) - end - if fz.type == FZType.Peng then - ctr_Four.selectedIndex = 0 - else - ctr_Four.selectedIndex = 1 - local FZCard = outCard:GetChild(string.format("Comp_Card%d", 4)) - self:fillCard2(FZCard, FZame, fz.card) - if fz.type == FZType.Gang_An then - self:fillCard2(FZCard, FZame, '00') - elseif fz.type == FZType.Gang_Peng then - self._view_FZList:RemoveChildAt(self._view_FZList.numItems - 2) - end - end - end -end +-- if fz.type == FZType.Chi then +-- for i = 1, 3 do +-- local FZCard = outCard:GetChild(string.format("Comp_Card%d", i)) +-- self:fillCard2(FZCard, FZame, fz.opcard[i]) +-- end +-- else +-- local ctr_Four = outCard:GetController("isFour") +-- for i = 1, 3 do +-- local FZCard = outCard:GetChild(string.format("Comp_Card%d", i)) +-- self:fillCard2(FZCard, FZame, fz.card) +-- end +-- if fz.type == FZType.Peng then +-- ctr_Four.selectedIndex = 0 +-- else +-- ctr_Four.selectedIndex = 1 +-- local FZCard = outCard:GetChild(string.format("Comp_Card%d", 4)) +-- self:fillCard2(FZCard, FZame, fz.card) +-- if fz.type == FZType.Gang_An then +-- self:fillCard2(FZCard, FZame, '00') +-- elseif fz.type == FZType.Gang_Peng then +-- self._view_FZList:RemoveChildAt(self._view_FZList.numItems - 2) +-- end +-- end +-- end +-- end -- 获取手牌资源位置,可以在扩展中复写 function M:GetCardObjPack()