modules/world: use only the "actor" name
This commit is contained in:
parent
c50f71f244
commit
3fce24a211
1 changed files with 7 additions and 7 deletions
|
@ -3,25 +3,25 @@ local BaseWorld = Object:extend()
|
||||||
function BaseWorld:new(scene)
|
function BaseWorld:new(scene)
|
||||||
self.scene = scene
|
self.scene = scene
|
||||||
|
|
||||||
self.entities = {}
|
self.actors = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
function BaseWorld:registerEntity(entity)
|
function BaseWorld:registerActor(actor)
|
||||||
table.insert(self.entities, entity)
|
table.insert(self.actors, actor)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BaseWorld:countEntity()
|
function BaseWorld:countActors()
|
||||||
return #self.entities
|
return #self.actors
|
||||||
end
|
end
|
||||||
|
|
||||||
function BaseWorld:update(dt)
|
function BaseWorld:update(dt)
|
||||||
for i,v in ipairs(self.entities) do
|
for i,v in ipairs(self.actors) do
|
||||||
v:update(dt)
|
v:update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BaseWorld:draw(dt)
|
function BaseWorld:draw(dt)
|
||||||
for i,v in ipairs(self.entities) do
|
for i,v in ipairs(self.actors) do
|
||||||
v:draw(dt)
|
v:draw(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue