fix(cbs): add a minimal duration to moving
This commit is contained in:
parent
86b5ad1cae
commit
737d0e5a69
1 changed files with 3 additions and 3 deletions
|
@ -126,7 +126,7 @@ function Hero:getMovementDuration(dx, dy, duration)
|
|||
end
|
||||
|
||||
function Hero:goTo(dx, dy, timerName, duration)
|
||||
local duration = self:getMovementDuration(dx, dy, duration)
|
||||
local duration = math.min(self:getMovementDuration(dx, dy, duration), 0.30)
|
||||
if duration > 0 then
|
||||
self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad')
|
||||
end
|
||||
|
@ -134,7 +134,7 @@ function Hero:goTo(dx, dy, timerName, duration)
|
|||
end
|
||||
|
||||
function Hero:jumpTo(dx, dy, size, timerName, spinjump, duration)
|
||||
local duration = self:getMovementDuration(dx, dy, duration)
|
||||
local duration = math.min(self:getMovementDuration(dx, dy, duration), 0.30)
|
||||
self.tweens:newTween(0, duration, {x = dx, y = dy}, 'inOutQuad')
|
||||
self.tweens:newTimer(duration + 0.02, timerName)
|
||||
self:setJump(size, spinjump, duration)
|
||||
|
@ -414,7 +414,7 @@ function Hero:chorJump(args)
|
|||
xx, yy = self.choregraphy.dx, self.choregraphy.dy
|
||||
end
|
||||
|
||||
self:jumpTo(xx, yy, 32, "action_jumpBack", false)
|
||||
self:jumpTo(xx, yy, 48, "action_jumpBack", false)
|
||||
self:blockChoregraphy(args.blockProcess, "action_jumpBack")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue