local M={}
local alpha=0.0
local fading=false
local fadeTimer=0.0
function M.load()
alpha=0.0
fading=false
fadeTimer=0.0 end
function M.fire(_t)
if alpha<0.60 then alpha=0.60 end
fading=true
fadeTimer=1.00 end
function M.update(dt,_timePassed)
if not fading then return end
fadeTimer=fadeTimer-dt
if fadeTimer<=0 then
alpha=0
fading=false
else
alpha=(fadeTimer/1.00)*0.60 end end
function M.draw()
if alpha<=0 then return end
local W,H=love.graphics.getWidth(),love.graphics.getHeight()
love.graphics.setColor(1,1,1,alpha)
love.graphics.rectangle("fill",0,0,W,H)
love.graphics.setColor(1,1,1,1) end
function M.isActive()
return alpha>0 end
return M
