主unity奔溃,上传lua修改、
parent
396ecbd69b
commit
1682cc668d
|
|
@ -165,11 +165,11 @@ function M:UpdateHandCard(getcard, mp)
|
|||
self:__OnClickGetCard(context)
|
||||
end)
|
||||
else
|
||||
if i >= self._view_handCardList.numItems then
|
||||
btn_card = self._view_handCardList:AddItemFromPool()
|
||||
else
|
||||
-- if i >= self._view_handCardList.numItems then
|
||||
-- btn_card = self._view_handCardList:AddItemFromPool()
|
||||
-- else
|
||||
btn_card = self._view_handCardList:GetChildAt(i)
|
||||
end
|
||||
-- end
|
||||
end
|
||||
self:fillCard2(btn_card, handCardName, tem_card)
|
||||
local c_v = NewCardView(btn_card, tem_card)
|
||||
|
|
@ -280,6 +280,7 @@ end
|
|||
function M:__OnClickHandCard(context)
|
||||
print("=======================lingmengclickhand")
|
||||
self._ctr_seletedGet.selectedIndex = 0
|
||||
self._click_index = self._view_handCardList.selectedIndex
|
||||
local button = context.data
|
||||
-- local _carViewList = self._carViewList
|
||||
-- for i = 1, #_carViewList do
|
||||
|
|
@ -288,9 +289,12 @@ function M:__OnClickHandCard(context)
|
|||
-- end
|
||||
-- end
|
||||
local _room = DataManager.CurrenRoom
|
||||
if (Utils.IsDoubleClick(context) and _room.curren_outcard_seat == _room.self_player.seat) then
|
||||
if ((Utils.IsDoubleClick(context) or self._click_index == self._view_handCardList.selectedIndex) and _room.curren_outcard_seat == _room.self_player.seat) then
|
||||
local card = button.data
|
||||
self._mainView:OutCard(card.card_item)
|
||||
self._view_handCardList.selectedIndex = -1
|
||||
self._click_index = self._view_handCardList.selectedIndex
|
||||
self._ctr_seletedGet.selectedIndex = 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -307,6 +311,9 @@ function M:__OnClickGetCard(context)
|
|||
if (Utils.IsDoubleClick(context) and _room.curren_outcard_seat == _room.self_player.seat) then
|
||||
local card = button.data
|
||||
self._mainView:OutCard(card.card_item)
|
||||
self._view_handCardList.selectedIndex = -1
|
||||
self._click_index = self._view_handCardList.selectedIndex
|
||||
self._ctr_seletedGet.selectedIndex = 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -372,6 +379,10 @@ function M:Clear(bskip)
|
|||
self._view_handCardList:RemoveChildrenToPool()
|
||||
self._view_outCardList:RemoveChildrenToPool()
|
||||
self._view_FZList:RemoveChildrenToPool()
|
||||
|
||||
self._view_handCardList.selectedIndex = -1
|
||||
self._click_index = self._view_handCardList.selectedIndex
|
||||
self._ctr_seletedGet.selectedIndex = 0
|
||||
if bskip == nil or bskip == false then
|
||||
self._mask_liangpai:RemoveChildren(0, -1, true)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue