feat: add a shadow on the overworld
This commit is contained in:
parent
89b0eb0b44
commit
ce5f56c556
3 changed files with 8 additions and 3 deletions
BIN
sonic-radiance.love/assets/sprites/owshadow.png
Normal file
BIN
sonic-radiance.love/assets/sprites/owshadow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 613 B |
|
@ -36,10 +36,14 @@ function Parent:setCharset(charset, charId, cantWalk)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Parent:drawCharset(charset, charId)
|
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
|
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
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ return {
|
||||||
{"lvl", "assets/gui/strings/lvl.png"},
|
{"lvl", "assets/gui/strings/lvl.png"},
|
||||||
{"exp", "assets/gui/strings/exp.png"},
|
{"exp", "assets/gui/strings/exp.png"},
|
||||||
|
|
||||||
{"itembox", "assets/gui/itembox.png"}
|
{"itembox", "assets/gui/itembox.png"},
|
||||||
|
{"shadow", "assets/sprites/owshadow.png"},
|
||||||
|
|
||||||
},
|
},
|
||||||
["fonts"] = {
|
["fonts"] = {
|
||||||
|
|
Loading…
Reference in a new issue