From a7def096df51f40994bc0fdf7f6a8275c9704b7b Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 27 Jul 2019 20:55:00 +0200 Subject: [PATCH] feat: draw a real shadow --- sonic-radiance.love/game/modules/world/actors/parent.lua | 6 +++++- sonic-radiance.love/scenes/test_scene/assets.lua | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sonic-radiance.love/game/modules/world/actors/parent.lua b/sonic-radiance.love/game/modules/world/actors/parent.lua index 3d75e23..c546988 100644 --- a/sonic-radiance.love/game/modules/world/actors/parent.lua +++ b/sonic-radiance.love/game/modules/world/actors/parent.lua @@ -8,7 +8,11 @@ end function Parent:draw() Parent.super.draw(self) - self:drawMainHitbox() + --self:drawMainHitbox() +end + +function Parent:drawShadow(x, y) + self.assets.images["shadow"]:draw(x-4, y+8) end return Parent diff --git a/sonic-radiance.love/scenes/test_scene/assets.lua b/sonic-radiance.love/scenes/test_scene/assets.lua index 5c07014..712c1c4 100644 --- a/sonic-radiance.love/scenes/test_scene/assets.lua +++ b/sonic-radiance.love/scenes/test_scene/assets.lua @@ -1,6 +1,6 @@ return { ["textures"] = { - + {"shadow", "assets/sprites/shadow.png"} }, ["sprites"] = { {"sonic", "assets/sprites/characters/sonic"},