Rehandled Darkness and Lights. Refactored lots of stuff. Rewritten shaders.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Particle = Entity:New(x,y)
|
||||
LoadedObjects.Particles = {}
|
||||
|
||||
function Particle:New(x,y,particle_data)
|
||||
local o = Entity:New(x,y)
|
||||
@@ -31,7 +32,7 @@ Particle = Entity:New(x,y)
|
||||
o.lightRange = particle_data.light
|
||||
local flicker = particle_data.light_flicker or nil
|
||||
local color = particle_data.light_color or nil
|
||||
o.light = CreateLight(o.pos.x,o.pos.y,o.lightRange,flicker,color)
|
||||
o.light = Light:New(o.pos.x,o.pos.y,o.lightRange,flicker,color)
|
||||
end
|
||||
|
||||
-- animations
|
||||
@@ -44,8 +45,8 @@ Particle = Entity:New(x,y)
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(LoadedParticles,o)
|
||||
o.id = #LoadedParticles
|
||||
table.insert(LoadedObjects.Particles,o)
|
||||
o.id = #LoadedObjects.Particles
|
||||
|
||||
setmetatable(o, self)
|
||||
self.__index = self
|
||||
|
||||
Reference in New Issue
Block a user