在Lua中,如何使用什么来从固定的分钟开始倒数计秒?

我正在尝试在 Lua 中从固定分钟(如 1:00)倒数到 0:00。

如何实现?

点赞
用户1137788
用户1137788

我假设你正在使用 Corona SDK。

Corona 提供了一个简单的方法

local time = 60
local function decreaseTime()
   time = time-1
   print(time)
end

timer.performWithDelay(1000,decreaseTime,60)

可以在这里阅读更多信息 http://developer.anscamobile.com/reference/index/timerperformwithdelay

2012-06-18 17:06:43