feat: add a shadow on the overworld

This commit is contained in:
Kazhnuz 2021-03-22 17:08:03 +01:00
parent 89b0eb0b44
commit ce5f56c556
3 changed files with 8 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

View file

@ -36,10 +36,14 @@ function Parent:setCharset(charset, charId, cantWalk)
end
function Parent:drawCharset(charset, charId)
local x, y = utils.math.floorCoord(self.x, self.y)
love.graphics.setColor(1,1,1,0.5)
self.assets.images["shadow"]:draw(x + 1, y + 10)
utils.graphics.resetColor()
if (self:isMoving() and (not self.cantWalk)) then
self.charsetManager:draw(self.charset, self.charId, self.charDir, self.x, self.y)
self.charsetManager:draw(self.charset, self.charId, self.charDir, x, y - 1)
else
self.charsetManager:drawStanding(self.charset, self.charId, self.charDir, self.x, self.y)
self.charsetManager:drawStanding(self.charset, self.charId, self.charDir, x, y - 1)
end
end

View file

@ -27,7 +27,8 @@ return {
{"lvl", "assets/gui/strings/lvl.png"},
{"exp", "assets/gui/strings/exp.png"},
{"itembox", "assets/gui/itembox.png"}
{"itembox", "assets/gui/itembox.png"},
{"shadow", "assets/sprites/owshadow.png"},
},
["fonts"] = {