modules/world: don't access directly to the actors manager inside worlds
This commit is contained in:
parent
ceb28eb445
commit
eac75df874
1 changed files with 4 additions and 2 deletions
|
@ -176,7 +176,8 @@ function BaseWorld:update(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BaseWorld:updateActors(dt)
|
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)
|
v:update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -198,7 +199,8 @@ function BaseWorld:draw(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BaseWorld:drawActors()
|
function BaseWorld:drawActors()
|
||||||
for i,v in ipairs(self.actors) do
|
local actors = self:getActors()
|
||||||
|
for i,v in ipairs(actors) do
|
||||||
v:draw()
|
v:draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue