Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我的应用程序已经启动时,如何更改计时器上的参数?
这是我的功能
increase = function() frequency = frequency - 100 end
然后我有一个按钮应该增加定时器的频率
对象:addEventListener(“点击”,增加)
计时器:
频率 = 1000 superTimer = timer.performWithDelay(频率,spawnCircle,-1)
谢谢!乔金
local freq = 1000; function increase() freq = freq - 100 print(freq) end object:addEventListener("tap", increase) function myTimer() superTimer = timer.performWithDelay(freq,function () spawnCircle();myTimer() end, 1) end myTimer()
这将是工作。