fix(cbs): fix an hiccup
This commit is contained in:
parent
737d0e5a69
commit
da3ab42f32
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ function Hero:getMovementDuration(dx, dy, duration)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Hero:goTo(dx, dy, timerName, duration)
|
function Hero:goTo(dx, dy, timerName, duration)
|
||||||
local duration = math.min(self:getMovementDuration(dx, dy, duration), 0.30)
|
local duration = math.max(self:getMovementDuration(dx, dy, duration), 0.30)
|
||||||
if duration > 0 then
|
if duration > 0 then
|
||||||
self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad')
|
self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad')
|
||||||
end
|
end
|
||||||
|
@ -134,7 +134,7 @@ function Hero:goTo(dx, dy, timerName, duration)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Hero:jumpTo(dx, dy, size, timerName, spinjump, duration)
|
function Hero:jumpTo(dx, dy, size, timerName, spinjump, duration)
|
||||||
local duration = math.min(self:getMovementDuration(dx, dy, duration), 0.30)
|
local duration = math.max(self:getMovementDuration(dx, dy, duration), 0.30)
|
||||||
self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad')
|
self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad')
|
||||||
self.tweens:newTimer(duration + 0.02, timerName)
|
self.tweens:newTimer(duration + 0.02, timerName)
|
||||||
self:setJump(size, spinjump, duration)
|
self:setJump(size, spinjump, duration)
|
||||||
|
|
Loading…
Reference in a new issue