Skip to content

Instantly share code, notes, and snippets.

@evandro-costa
Last active March 22, 2020 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save evandro-costa/db6f19fb6e1a5146d79b to your computer and use it in GitHub Desktop.
Save evandro-costa/db6f19fb6e1a5146d79b to your computer and use it in GitHub Desktop.
Corona SDK - Infinite Transition Loop sample
local animate = function(obj, ref)
if ref then
obj.transitionLoop = ref
end
-- Optional resets:
obj.x = 0
transition.to(obj, {
x = 10,
-- Do not remove:
onComplete = obj.transitionLoop
})
end
-- Start infinite loop:
animate(Target, animate)
-- To stop infinite loop:
-- Target.transitionLoop = nil
@Abdou23
Copy link

Abdou23 commented Sep 14, 2016

Hi, any idea what to do if I want to link multiple transitions together and still loop them?!

@olueiro
Copy link

olueiro commented Feb 21, 2019

Hi, any idea what to do if I want to link multiple transitions together and still loop them?!

You need to edit the animate function and add your customs transitions :)

@AlessioITA
Copy link

thank you very much evandro-costa, really appreciated the example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment