Reputation: 12559
I am trying to make a countdown from a fixed minute like 1:00 to 0:00 in Lua.
How can I do that?
Upvotes: 1
Views: 3073
Reputation: 3633
I assume you are using Corona SDK.
Corona provides a simple way
local time = 60
local function decreaseTime()
time = time-1
print(time)
end
timer.performWithDelay(1000,decreaseTime,60)
have a read here http://developer.anscamobile.com/reference/index/timerperformwithdelay
Upvotes: 4