默认别人出牌关闭出牌,等提示出牌或者弹起的牌符合牌型开启出牌
parent
ff796b86dd
commit
62c85471b9
|
|
@ -746,7 +746,6 @@ function M:TouchMoveEnd(context)
|
||||||
table.sort(send_card, tableSortNumber)
|
table.sort(send_card, tableSortNumber)
|
||||||
send_card = #xuan_card > 0 and xuan_card or send_card
|
send_card = #xuan_card > 0 and xuan_card or send_card
|
||||||
self._cardCheck:initCards(send_card, #xuan_card > 0, #send_card == self._view_handCard.numItems)
|
self._cardCheck:initCards(send_card, #xuan_card > 0, #send_card == self._view_handCard.numItems)
|
||||||
print("lingmengthis?")
|
|
||||||
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
|
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
|
||||||
else
|
else
|
||||||
self._ctr_canSendCard.selectedIndex = 0
|
self._ctr_canSendCard.selectedIndex = 0
|
||||||
|
|
@ -796,9 +795,10 @@ function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, p
|
||||||
self.tips_click_count = 0
|
self.tips_click_count = 0
|
||||||
self.send_card = {}
|
self.send_card = {}
|
||||||
self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard)
|
self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard)
|
||||||
|
self._ctr_canSendCard.selectedIndex = 0
|
||||||
|
|
||||||
if #self.tips_card_list >= 1 then
|
if #self.tips_card_list >= 1 then
|
||||||
-- body
|
-- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环)
|
||||||
self:UpdateHandCardsColor()
|
self:UpdateHandCardsColor()
|
||||||
end
|
end
|
||||||
--
|
--
|
||||||
|
|
@ -1032,10 +1032,21 @@ end
|
||||||
|
|
||||||
--
|
--
|
||||||
function M:UpdateHandCardsColor()
|
function M:UpdateHandCardsColor()
|
||||||
|
local send_card = {}
|
||||||
for i = 1, #self.card_list do
|
for i = 1, #self.card_list do
|
||||||
local card_view = self.card_list[i]
|
local card_view = self.card_list[i]
|
||||||
local num = card_view.btn_card.touchable == true and 0 or 1
|
local num = card_view.btn_card.touchable == true and 0 or 1
|
||||||
self:SetBtnCardColor(card_view, num)
|
self:SetBtnCardColor(card_view, num)
|
||||||
|
if card_view.btn_card.selected and card_view.btn_card.touchable then
|
||||||
|
table.insert(send_card, card_view)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #send_card > 0 then
|
||||||
|
table.sort(send_card, tableSortNumber)
|
||||||
|
self._cardCheck:initCards(send_card, false, #send_card == self._view_handCard.numItems)
|
||||||
|
self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0
|
||||||
|
else
|
||||||
|
self._ctr_canSendCard.selectedIndex = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1069,7 +1080,6 @@ function M:BtnEvent()
|
||||||
self:ErrorTip('请选择要出的牌')
|
self:ErrorTip('请选择要出的牌')
|
||||||
else
|
else
|
||||||
self.gameCtr:SendCard(send_card, currentCard)
|
self.gameCtr:SendCard(send_card, currentCard)
|
||||||
self._ctr_canSendCard.selectedIndex = 0
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue