Rehandled Darkness and Lights. Refactored lots of stuff. Rewritten shaders.
This commit is contained in:
@@ -27,7 +27,7 @@ CursedBook = Entity:New(x,y)
|
||||
|
||||
-- light
|
||||
o.light_range = 500
|
||||
o.light = CreateLight(o.pos.x,o.pos.y,o.light_range,2,HEX2RGB("#fe00d1"))
|
||||
o.light = Light:New(o.pos.x,o.pos.y,o.light_range,2,HEX2RGB("#fe00d1"))
|
||||
|
||||
table.insert(LoadedObjects.Entities,o)
|
||||
o.id = #LoadedObjects.Entities
|
||||
|
||||
@@ -14,7 +14,7 @@ function Decoration:New(x,y,animation,lightRange)
|
||||
|
||||
if lightRange ~= nil then
|
||||
o.lightRange = lightRange
|
||||
o.light = CreateLight(o.pos.x,o.pos.y,o.lightRange)
|
||||
o.light = Light:New(o.pos.x,o.pos.y,o.lightRange)
|
||||
end
|
||||
|
||||
table.insert(LoadedObjects.Entities,o)
|
||||
|
||||
@@ -20,7 +20,7 @@ Fairy = Entity:New(x,y)
|
||||
|
||||
-- light
|
||||
o.light_range = 80
|
||||
o.light = CreateLight(o.pos.x,o.pos.y,o.light_range,nil,HEX2RGB("#fed100"))
|
||||
o.light = Light:New(o.pos.x,o.pos.y,o.light_range,nil,HEX2RGB("#fed100"))
|
||||
|
||||
-- timer
|
||||
o.particle_timer = 0
|
||||
|
||||
@@ -27,6 +27,8 @@ function HookAnchor:HandleAnimation()
|
||||
end
|
||||
|
||||
function HookAnchor:DrawBackground()
|
||||
Entity.DrawBackground(self)
|
||||
love.graphics.setColor(1,1,1,1)
|
||||
love.graphics.circle(
|
||||
"line",
|
||||
-Camera.pos.x + self.pos.x,
|
||||
|
||||
@@ -28,7 +28,7 @@ Kupo = Entity:New(x,y)
|
||||
o.hostile = true
|
||||
|
||||
o.lightRange = o.range/2
|
||||
o.light = CreateLight(o.pos.x,o.pos.y,o.lightRange)
|
||||
o.light = Light:New(o.pos.x,o.pos.y,o.lightRange)
|
||||
|
||||
table.insert(LoadedObjects.Entities,o)
|
||||
o.id = #LoadedObjects.Entities
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
to = {x = 8, y = 0} -- gameworld pixels
|
||||
}
|
||||
|
||||
o.lightRange = 10 -- screen pixels
|
||||
o.lightRange = 40 -- screen pixels
|
||||
|
||||
-- status
|
||||
o.isDashing = false
|
||||
@@ -66,7 +66,7 @@
|
||||
o:getBoundingBox(o.body,0,3,-1,-3)
|
||||
|
||||
-- lights
|
||||
o.light = CreateLight(o.pos.x,o.pos.y,o.lightRange)
|
||||
o.light = Light:New(o.pos.x,o.pos.y,o.lightRange)
|
||||
|
||||
table.insert(LoadedObjects.Entities,o)
|
||||
o.id = #LoadedObjects.Entities
|
||||
|
||||
Reference in New Issue
Block a user