From 325651a23ae020a0eda7ec5e9886ff1ef529131a Mon Sep 17 00:00:00 2001 From: bizcochito Date: Sat, 20 Mar 2021 13:12:03 +0100 Subject: [PATCH] solved(not solved) animation bug --- main.lua | 4 ++-- scripts/levels.lua | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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)