Hi,
I want to flash a white screen, so I made that white screen as a fullscreen rectangle and decided to increase and decrease it’s alpha to imitate the flash effect, so I wrote this:
-- Flash screen to white timer.performWithDelay(1, function() whiteScreen.alpha = whiteScreen.alpha + 0.1 print("Increasing:" .. whiteScreen.alpha) end, 10) -- Fading out the white timer.performWithDelay(500, function() whiteScreen.alpha = whiteScreen.alpha - 0.1 print("Decreasing:" .. whiteScreen.alpha) end , 10)
The fade in is OK but the fade out runs very slow, like 1fps.
Any idea why?
Thanks.