Right now the condition of dt being posititive is pretty much "hard-coded" into anim8. The culprint is the update method:
function Animation:update(dt)
if self.status ~= "playing" then return end
self.timer = self.timer + dt
while self.timer > self.delays[self.position] do
self.timer = self.timer - self.delays[self.position]
self.position = self.position + self.direction
if self.position < 1 or self.position > #self.frames then
self:endSequence()
end
end
end
It would be cool if animation:update admitted negative dts. This way we could use it in games that involve time manipulation (like in Braid).
Right now the condition of dt being posititive is pretty much "hard-coded" into anim8. The culprint is the update method:
It would be cool if animation:update admitted negative dts. This way we could use it in games that involve time manipulation (like in Braid).