Rehandled Darkness and Lights. Refactored lots of stuff. Rewritten shaders.

This commit is contained in:
lustlion
2022-02-21 18:24:20 +01:00
parent 192b1e6ca0
commit a944192f67
19 changed files with 166 additions and 202 deletions

View File

@@ -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