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
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue