main.lua, etc. - use a sorted list of mobs

The mobs are characters to animate.  They're sorted by screen depth,
so that nearer ones render over farther ones.
This commit is contained in:
Nick Stokoe
2022-07-02 22:59:14 +01:00
parent 1cfc037283
commit cb49e2b933
3 changed files with 28 additions and 14 deletions

View File

@@ -162,6 +162,8 @@ return function(arena, draw, update)
local se, sw = 0, 0
local jumpPath = newJumpPath(arena.getColWidth(), arena.getRowHeight())
return {
getDepth = function() return sw+se; end,
jump = function(dir)
if jumpTime ~= nil then
return -- already jumping