particles time to be handled in frames instead of seconds optionally
This commit is contained in:
@@ -21,8 +21,14 @@ function Particle:new(x,y,particle_data)
|
||||
o.sprite_flip = particle_data.sprite_flip or o.sprite_flip
|
||||
|
||||
o.time = particle_data.time or nil
|
||||
if o.time ~= nil then o.time = o.time * game.framerate end
|
||||
|
||||
if o.time ~= nil then
|
||||
if particle_data.time_unit ~= nil
|
||||
and particle_data.time_unit == "frames" then
|
||||
o.time = o.time
|
||||
else
|
||||
o.time = o.time * game.framerate
|
||||
end
|
||||
end
|
||||
o.timer = 0
|
||||
|
||||
o.vel = {
|
||||
|
||||
Reference in New Issue
Block a user