From daae72dd8a6dd037861ea6046cef43ea85bf976c Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 7 Aug 2021 17:21:26 +0200 Subject: [PATCH] feat: add ysorting to battlesystem --- sonic-radiance.love/scenes/battlesystem/world.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/sonic-radiance.love/scenes/battlesystem/world.lua b/sonic-radiance.love/scenes/battlesystem/world.lua index 8c6e43e..a65bc3b 100644 --- a/sonic-radiance.love/scenes/battlesystem/world.lua +++ b/sonic-radiance.love/scenes/battlesystem/world.lua @@ -96,6 +96,7 @@ function World:draw() end function World:drawActors() + table.sort(self.actors, function(a, b) return (a.y < b.y) end) for i, actor in ipairs(self.actors) do actor:draw() end