吃碰杠修复
parent
b59bc30c50
commit
9b42366d4b
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue