modules/world: don't access directly to the actors manager inside worlds

This commit is contained in:
Kazhnuz 2019-04-22 09:36:29 +02:00
parent ceb28eb445
commit eac75df874

View file

@ -176,7 +176,8 @@ function BaseWorld:update(dt)
end
function BaseWorld:updateActors(dt)
for i,v in ipairs(self.actors) do
local actors = self:getActors()
for i,v in ipairs(actors) do
v:update(dt)
end
end
@ -198,7 +199,8 @@ function BaseWorld:draw(dt)
end
function BaseWorld:drawActors()
for i,v in ipairs(self.actors) do
local actors = self:getActors()
for i,v in ipairs(actors) do
v:draw()
end
end