-
-
Save DoubleSlashDesign2/1536c84884304169d652 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function fire() | |
local beam = {} | |
for i = 1, 20 do | |
--Have used circle, but if you use a blurry yellow glow, it would look more like a fire | |
beam[i] = display.newCircle(0,0,3.5) --display.newImage("glow4.png")-- | |
beam[i].x, beam[i].y = math.random(100,200) , 500 | |
beam[i].alpha = 0.5 | |
beam[i].trans = transition.to(beam[i], { x = math.random(100,200), y = math.random (300, 400), alpha = 0.1, time = math.random(1000, 1200), delay = 100, onComplete = function() if beam[i] then beam[i]:removeSelf() end end }) | |
end | |
end | |
timer.performWithDelay(200, fire, -1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment