In games there are often limits put on your abilities — maybe you can only cast a spell once every minute or two. Maybe the cannons in your ship start running red hot and you have to allow them to cool or they’ll explode.
Cool downs are commonly seen in games, so let’s take a look at one way you can accomplish this with Corona SDK:
Want The Sample Source Code?
If you’re a member of this site, make sure you’re logged in and you should see a link right below here where you can download the code for this cool function. It comes with a little demo program so you can see it in action.
If you’re not a member, register and then look for an email from me — click the verification link in that email and you should be good to go. (If you don’t see an email from me, look in your spam/junk folder — it sometimes gets misrouted.)
Click here to join (free!) and download the project files (or log in if you’re already a member). After logging in you will see the link below,