diff --git a/main.lua b/main.lua index f3d25cb..39d5140 100644 --- a/main.lua +++ b/main.lua @@ -121,9 +121,9 @@ function love.draw() draw_entity(entity) end -- draw every unit's troops - for _, unit in pairs(current_level.units) do for _, entity in pairs(unit.troops) do + for _, u in pairs(current_level.units) do for _, entity in pairs(u.troops) do draw_entity(entity) - end end + end break end --Stop loop at first loop, we need to find better way but this works for now sob -- draw selection if selecting_troops == true then diff --git a/scripts/levels.lua b/scripts/levels.lua index fa3eb10..dd656dd 100644 --- a/scripts/levels.lua +++ b/scripts/levels.lua @@ -34,6 +34,7 @@ for i = 1, 8, 1 do for j = 1, 5, 1 do end end table.insert(units,nu) + --[[local nu = Unit:newUnit("Implings",player.id,portrait.impling,statTable.implings) local xx, yy, zz = 3, 0, 3 for i = 1, 8, 1 do for j = 1, 5, 1 do @@ -79,4 +80,4 @@ local xx, yy, zz = 0, 0, 3 local azifer = Object:new2DAnimated("azifer",portrait._yari,xx,yy,zz,16,16) load_animation(azifer,animation._yari.idle,4,8) table.insert(nu.troops,azifer) -table.insert(units,nu) \ No newline at end of file +table.insert(units,nu)