四人选择错误修复

master
罗家炜 2025-05-07 11:08:06 +08:00
parent ec89eae095
commit 2370ea7783
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,6 @@ function M:onTouchBegin(context)
self.touch = true
local button = context.sender
self.touchPos = Vector2.New(context.inputEvent.x, context.inputEvent.y)
self:ClearMove()
end
function M:onTouchMove(context)
@ -156,7 +155,6 @@ function M:onTouchMove(context)
end
self:outCardMove(context)
else
self.ischoose = true
local touchPos = self._view_handCardList:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x,
context.inputEvent.y))
local cardWidth = button.width;
@ -164,6 +162,7 @@ function M:onTouchMove(context)
local chooseIndex = math.floor(touchPos.x / (cardWidth + grap))
if chooseIndex >= self._view_handCardList.numItems then
self.ischoose = true
if touchPos.x > cardWidth + (cardWidth + grap) * (self._view_handCardList.numItems - 1) and self.getcard then
self:ChooseOut()
else
@ -172,6 +171,7 @@ function M:onTouchMove(context)
end
end
else
self.ischoose = true
if self._view_handCardList.selectedIndex ~= chooseIndex then
self:ChooseHand(chooseIndex)
end