吃碰杠修复
parent
b59bc30c50
commit
9b42366d4b
|
|
@ -51,8 +51,6 @@ function M:init()
|
||||||
|
|
||||||
self._ctr_getCard = self._view:GetController('getCard')
|
self._ctr_getCard = self._view:GetController('getCard')
|
||||||
self._ctr_seletedGet = self._view:GetController('seletedGetCard')
|
self._ctr_seletedGet = self._view:GetController('seletedGetCard')
|
||||||
|
|
||||||
ViewUtil.ErrorTip(nil, self._view:GetChild('n39') == nil and "11111" or "2222")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:ShowHuTip(card_list)
|
function M:ShowHuTip(card_list)
|
||||||
|
|
|
||||||
|
|
@ -715,7 +715,7 @@ function M:OnFangziAction(...)
|
||||||
local index = arg[3]
|
local index = arg[3]
|
||||||
printlog("OnFangziAction")
|
printlog("OnFangziAction")
|
||||||
local info = _player_card_info[self:GetPos(player.seat)]
|
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")
|
local effect = UIPackage.CreateObject("Extend_MJ_NanCheng", "FzEffect")
|
||||||
if fz.type == FZType.Peng then
|
if fz.type == FZType.Peng then
|
||||||
self:PlaySound("NanCheng_MJ", player.self_user.sex, "peng" .. math.random(1, 3))
|
self:PlaySound("NanCheng_MJ", player.self_user.sex, "peng" .. math.random(1, 3))
|
||||||
|
|
@ -734,7 +734,7 @@ function M:OnFangziAction(...)
|
||||||
end
|
end
|
||||||
effect.touchable = false
|
effect.touchable = false
|
||||||
effect:GetTransition("t2"):Play()
|
effect:GetTransition("t2"):Play()
|
||||||
pNode:AddChild(effect)
|
-- pNode:AddChild(effect)
|
||||||
coroutine.start(function()
|
coroutine.start(function()
|
||||||
coroutine.wait(0.3)
|
coroutine.wait(0.3)
|
||||||
self._popEvent = true
|
self._popEvent = true
|
||||||
|
|
@ -749,10 +749,14 @@ function M:OnFangziAction(...)
|
||||||
local fs_info = _player_card_info[self:GetPos(fz.from_seat)]
|
local fs_info = _player_card_info[self:GetPos(fz.from_seat)]
|
||||||
fs_info:UpdateOutCardList()
|
fs_info:UpdateOutCardList()
|
||||||
end
|
end
|
||||||
|
print("lingmengfz1")
|
||||||
info:UpdateFzList(fz, index, true)
|
info:UpdateFzList(fz, index, true)
|
||||||
|
print("lingmengfz2")
|
||||||
local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi
|
local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi
|
||||||
printlog(getcard)
|
print("lingmengfz3")
|
||||||
|
print(getcard)
|
||||||
info:UpdateHandCard(getcard)
|
info:UpdateHandCard(getcard)
|
||||||
|
print("lingmengfz4")
|
||||||
self:__CloseTip()
|
self:__CloseTip()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -214,22 +214,11 @@ local function getPos(my_seat, other_seat, total)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:UpdateFzList(fz, index, show_card)
|
function M:UpdateFzList(fz, index, show_card)
|
||||||
local fz_list = self._mask_data['fz_list']
|
|
||||||
local FZame = self._viewText_cardInfo['FZ_Card']
|
local FZame = self._viewText_cardInfo['FZ_Card']
|
||||||
index = index or 0
|
index = index or 0
|
||||||
show_card = show_card or nil
|
show_card = show_card or nil
|
||||||
|
|
||||||
local outCard
|
local outCard = self._view_FZList:AddItemFromPool()
|
||||||
|
|
||||||
-- 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()
|
|
||||||
|
|
||||||
if fz.type == FZType.Chi then
|
if fz.type == FZType.Chi then
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
|
|
@ -251,6 +240,8 @@ function M:UpdateFzList(fz, index, show_card)
|
||||||
self:fillCard2(FZCard, FZame, fz.card)
|
self:fillCard2(FZCard, FZame, fz.card)
|
||||||
if fz.type == FZType.Gang_An then
|
if fz.type == FZType.Gang_An then
|
||||||
self:fillCard2(FZCard, FZame, '00')
|
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
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -179,46 +179,41 @@ function M:__OnClickGetCard(context)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:UpdateFzList(fz, index, show_card)
|
-- function M:UpdateFzList(fz, index, show_card)
|
||||||
local isFour = false
|
-- -- local FZame = self._viewText_cardInfo['FZ_Card']
|
||||||
if fz.type == FZType.Gang or fz.type == FZType.Gang_An or fz.type == FZType.Gang_Peng then
|
-- local FZame = "202_"
|
||||||
isFour = true
|
-- index = index or 0
|
||||||
end
|
-- show_card = show_card or nil
|
||||||
|
|
||||||
-- local FZame = self._viewText_cardInfo['FZ_Card']
|
-- local outCard
|
||||||
local FZame = "202_"
|
|
||||||
index = index or 0
|
|
||||||
show_card = show_card or nil
|
|
||||||
|
|
||||||
local outCard
|
-- outCard = self._view_FZList:AddItemFromPool()
|
||||||
|
|
||||||
outCard = self._view_FZList:AddItemFromPool()
|
-- if fz.type == FZType.Chi then
|
||||||
|
-- for i = 1, 3 do
|
||||||
if fz.type == FZType.Chi then
|
-- local FZCard = outCard:GetChild(string.format("Comp_Card%d", i))
|
||||||
for i = 1, 3 do
|
-- self:fillCard2(FZCard, FZame, fz.opcard[i])
|
||||||
local FZCard = outCard:GetChild(string.format("Comp_Card%d", i))
|
-- end
|
||||||
self:fillCard2(FZCard, FZame, fz.opcard[i])
|
-- else
|
||||||
end
|
-- local ctr_Four = outCard:GetController("isFour")
|
||||||
else
|
-- for i = 1, 3 do
|
||||||
local ctr_Four = outCard:GetController("isFour")
|
-- local FZCard = outCard:GetChild(string.format("Comp_Card%d", i))
|
||||||
for i = 1, 3 do
|
-- self:fillCard2(FZCard, FZame, fz.card)
|
||||||
local FZCard = outCard:GetChild(string.format("Comp_Card%d", i))
|
-- end
|
||||||
self:fillCard2(FZCard, FZame, fz.card)
|
-- if fz.type == FZType.Peng then
|
||||||
end
|
-- ctr_Four.selectedIndex = 0
|
||||||
if fz.type == FZType.Peng then
|
-- else
|
||||||
ctr_Four.selectedIndex = 0
|
-- ctr_Four.selectedIndex = 1
|
||||||
else
|
-- local FZCard = outCard:GetChild(string.format("Comp_Card%d", 4))
|
||||||
ctr_Four.selectedIndex = 1
|
-- self:fillCard2(FZCard, FZame, fz.card)
|
||||||
local FZCard = outCard:GetChild(string.format("Comp_Card%d", 4))
|
-- if fz.type == FZType.Gang_An then
|
||||||
self:fillCard2(FZCard, FZame, fz.card)
|
-- self:fillCard2(FZCard, FZame, '00')
|
||||||
if fz.type == FZType.Gang_An then
|
-- elseif fz.type == FZType.Gang_Peng then
|
||||||
self:fillCard2(FZCard, FZame, '00')
|
-- self._view_FZList:RemoveChildAt(self._view_FZList.numItems - 2)
|
||||||
elseif fz.type == FZType.Gang_Peng then
|
-- end
|
||||||
self._view_FZList:RemoveChildAt(self._view_FZList.numItems - 2)
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- 获取手牌资源位置,可以在扩展中复写
|
-- 获取手牌资源位置,可以在扩展中复写
|
||||||
function M:GetCardObjPack()
|
function M:GetCardObjPack()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue