Hi,
I have a counter going down from 60 to 0 in my main.lua file i would like for it to get to 0 and freeze the screen accepting no more input then 2-3 seconds later reload the screen to have the player start over…
– 4. Start the counter
local counter = 60
local timeDisplay = display.newText(counter,0,0,native.systemFrontBold,20)
timeDisplay.x = 25
timeDisplay.y = 60
local function updateTimer(event)
counter = counter - 1
timeDisplay.text = counter
if counter == 0 then
– put what happens here next
– reload the scene after 5 seconds
timer.performWithDelay( 5000, function()
end, 1 )
end
end
what am i missing?