editor progress, generic keybinds, player coyote value, cursed book entity, level changes, camera adjustments
This commit is contained in:
@@ -5,7 +5,7 @@ function CreateDarkness()
|
||||
return love.graphics.newCanvas(game.width/game.scale, game.height/game.scale)
|
||||
end
|
||||
|
||||
function CreateLight(x,y,range,lum,flicker)
|
||||
function CreateLight(x,y,range,flicker,color,lum)
|
||||
local o = {}
|
||||
o.pos = {
|
||||
x = x,
|
||||
@@ -13,11 +13,13 @@ function CreateLight(x,y,range,lum,flicker)
|
||||
}
|
||||
o.range = range
|
||||
o.lum = lum or 1
|
||||
o.color = color or {1,1,1}
|
||||
o.flicker_value = flicker or 2
|
||||
o.flicker = 0
|
||||
o.dim = 0
|
||||
o.flicker_speed = flicker_speed or 60/12
|
||||
o.flicker_time = 0
|
||||
|
||||
table.insert(Lights,o)
|
||||
o.id = #Lights
|
||||
return o
|
||||
@@ -52,9 +54,9 @@ function DoLights()
|
||||
end
|
||||
end
|
||||
love.graphics.setBlendMode("replace")
|
||||
love.graphics.setColor(1,1,1,1)
|
||||
for _, light in pairs(Lights) do
|
||||
if light.range ~= 0 then
|
||||
love.graphics.setColor(light.color[1],light.color[2],light.color[3],1)
|
||||
love.graphics.circle(
|
||||
"fill",
|
||||
(light.pos.x - Camera.pos.x) / game.scale,
|
||||
|
||||
Reference in New Issue
Block a user