【发布时间】:2013-02-14 11:15:20
【问题描述】:
我正在开发应用程序来观察你的跑步速度,为此我需要一个函数来显示你的最大速度。但找不到我该怎么做。
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 设为您在上面看到的号码。
我在 Conora SDK/Lua 中编程
【问题讨论】:
-
我无法理解您的代码。您想比较多个“速度”对象吗?能给我们一个函数头吗?