Hi. The function below is called inside a enterframe function(gameloop). My game works fine in iPod and iPhone 4 when I use Corona Build 484 but I can not say the same when I use Corona build 591. In Build 591 my game works with lag.
Is there anything wrong with particleRain function?
I hope that my explanation was clear.
[lua]local particleRain = function()
local dropRain = display.newImageRect(“rain.png”, 4, 16)
local randomRain = math.cos(mRandom(360)) * mRandom(100,200)
dropRain.isFixedRotation = true
dropRain.x = 160 + randomRain
dropRain.y = 0
local y1 = display.contentHeight
gameGroup:insert(dropRain)
transition.to(dropRain,{y = y1, time = 1000,
onComplete = function() dropRain:removeSelf() dropRain = nil end })
end
local gameloop = function( event )
.
.
.
particleRain()
.
.
.
end
Runtime:addEventListener( “enterFrame”, gameLoop ) [import]uid: 40281 topic_id: 16576 reply_id: 316576[/import]
[import]uid: 52491 topic_id: 16576 reply_id: 62512[/import]