【发布时间】:2013-02-14 09:34:27
【问题描述】:
我正在开发应用程序来观察你的跑步速度,为此我需要一个显示你的最高速度的功能。但找不到我的方法。
local speedText = string.format( '%.3f', event.speed )
speed.y = 250
speed.x = 125
local numValue = tonumber(speedText)*3.6
if numValue ~= nil then
speed.text = math.round( numValue )
end
我已将“speedText”设置为您在上面看到的数字。
我在 Corona SDK/Lua
中编码【问题讨论】: