如何通过每降低-1降低movementSpeed
来增加 star1.movementSpeed = 10000;
10秒
我已经尝试过了,但是无法弄清楚我在做什么
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)
最佳答案
通过使用固定
local function star1incr()
starTable[1].movementSpeed = starTable[1].movementSpeed - 1
print( "- 1" )
end
关于android - 降低速度值LUA,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14992184/