notsanequarium/scenes/gameplay/draw/shadow.lua

11 lines
577 B
Lua
Raw Normal View History

2021-01-23 23:30:01 +00:00
return function(feesh, spritescale)
local sw, sh = love.graphics.getDimensions()
2021-02-09 18:06:08 +00:00
if options.render_shadow then
for i, n in ipairs(feesh) do
love.graphics.setColor(1, 1, 1, n.render.y + 0.2 - n.render.deathanim)
local sizes = {0.55, 0.7, 1}
local size = sizes[n.size + 1] or 1
love.graphics.draw(sprites['shadow'], n.render.x * sw - (sprites['shadow']:getWidth() * spritescale * size)/2, sh - sh * 0.18 - (sprites['shadow']:getHeight() * spritescale * size)/2 + n.render.y * sh * 0.08, 0, spritescale * size, spritescale * size)
end
2021-01-23 23:30:01 +00:00
end
end