四人选择错误修复
parent
ec89eae095
commit
2370ea7783
|
|
@ -130,7 +130,6 @@ function M:onTouchBegin(context)
|
||||||
self.touch = true
|
self.touch = true
|
||||||
local button = context.sender
|
local button = context.sender
|
||||||
self.touchPos = Vector2.New(context.inputEvent.x, context.inputEvent.y)
|
self.touchPos = Vector2.New(context.inputEvent.x, context.inputEvent.y)
|
||||||
self:ClearMove()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:onTouchMove(context)
|
function M:onTouchMove(context)
|
||||||
|
|
@ -156,7 +155,6 @@ function M:onTouchMove(context)
|
||||||
end
|
end
|
||||||
self:outCardMove(context)
|
self:outCardMove(context)
|
||||||
else
|
else
|
||||||
self.ischoose = true
|
|
||||||
local touchPos = self._view_handCardList:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x,
|
local touchPos = self._view_handCardList:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x,
|
||||||
context.inputEvent.y))
|
context.inputEvent.y))
|
||||||
local cardWidth = button.width;
|
local cardWidth = button.width;
|
||||||
|
|
@ -164,6 +162,7 @@ function M:onTouchMove(context)
|
||||||
local chooseIndex = math.floor(touchPos.x / (cardWidth + grap))
|
local chooseIndex = math.floor(touchPos.x / (cardWidth + grap))
|
||||||
|
|
||||||
if chooseIndex >= self._view_handCardList.numItems then
|
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
|
if touchPos.x > cardWidth + (cardWidth + grap) * (self._view_handCardList.numItems - 1) and self.getcard then
|
||||||
self:ChooseOut()
|
self:ChooseOut()
|
||||||
else
|
else
|
||||||
|
|
@ -172,6 +171,7 @@ function M:onTouchMove(context)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
self.ischoose = true
|
||||||
if self._view_handCardList.selectedIndex ~= chooseIndex then
|
if self._view_handCardList.selectedIndex ~= chooseIndex then
|
||||||
self:ChooseHand(chooseIndex)
|
self:ChooseHand(chooseIndex)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue