【社稷大典】长按贡献数量不够无法捐赠bug修复
parent
6407abc8c9
commit
e6610518ce
|
@ -219,7 +219,9 @@ function this.OnPointerUp(Pointgo,data)--抬起
|
||||||
this:RefreshBottom(numCount)
|
this:RefreshBottom(numCount)
|
||||||
this:RequestDonate(numCount)
|
this:RequestDonate(numCount)
|
||||||
else
|
else
|
||||||
this:RequestDonate(numCount-t)
|
if itemData[curItemIndex].leftNum > 0 then
|
||||||
|
this:RequestDonate(numCount-t)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
isPressed = false
|
isPressed = false
|
||||||
isShortPress = false
|
isShortPress = false
|
||||||
|
@ -239,6 +241,10 @@ function this.OnUpdate()
|
||||||
end
|
end
|
||||||
--发送捐献请求
|
--发送捐献请求
|
||||||
function this:RequestDonate(numCount)
|
function this:RequestDonate(numCount)
|
||||||
|
if numCount == 0 then
|
||||||
|
PopupTipPanel.ShowTip(Language[11197])
|
||||||
|
return
|
||||||
|
end
|
||||||
if trigger and numCount == 1 then
|
if trigger and numCount == 1 then
|
||||||
trigger = false
|
trigger = false
|
||||||
this:Refresh()
|
this:Refresh()
|
||||||
|
@ -285,10 +291,10 @@ function this:RefreshBottom(num)
|
||||||
else--实时更新进度条
|
else--实时更新进度条
|
||||||
--要判断是否还有道具进行捐献
|
--要判断是否还有道具进行捐献
|
||||||
if itemData[curItemIndex].leftNum - num < 0 then
|
if itemData[curItemIndex].leftNum - num < 0 then
|
||||||
PopupTipPanel.ShowTip(Language[11197])
|
this:RequestDonate(num - 1)
|
||||||
trigger = true
|
trigger = true
|
||||||
isPressed = false
|
isPressed = false
|
||||||
return
|
-- return
|
||||||
end
|
end
|
||||||
itemData[curItemIndex].num.text = itemData[curItemIndex].leftNum - num
|
itemData[curItemIndex].num.text = itemData[curItemIndex].leftNum - num
|
||||||
score = itemData[curItemIndex].value * num
|
score = itemData[curItemIndex].value * num
|
||||||
|
|
Loading…
Reference in New Issue