如何通过每 10 秒movementSpeed
减少-1 来增加。 star1.movementSpeed = 10000;
我已经尝试过了,但无法弄清楚我做错了什么
function initStar()
local star1 = {}
star1.imgpath = "Star1.png"; --Set Image Path for Star
star1.movementSpeed = 10000; --Determines the movement speed of star
table.insert(starTable, star1); --Insert Star into starTable
end --END initStar()
local function star1incr() -- increments Speed value every time it is called
movementSpeed = movementSpeed - 1
star1.movementSpeed = "movementSpeed: " .. movementSpeed
end
timer.performWithDelay(10000, star1incr, 0)