feat: add ysorting to battlesystem

This commit is contained in:
Kazhnuz 2021-08-07 17:21:26 +02:00
parent a67d1f0824
commit daae72dd8a

View file

@ -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