From 3fce24a21119da5eef9914b41c0f24750239c9a3 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 1 Apr 2019 13:09:21 +0200 Subject: [PATCH] modules/world: use only the "actor" name --- gamecore/modules/world/baseworld.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gamecore/modules/world/baseworld.lua b/gamecore/modules/world/baseworld.lua index c4a800c..8b62e1b 100644 --- a/gamecore/modules/world/baseworld.lua +++ b/gamecore/modules/world/baseworld.lua @@ -3,25 +3,25 @@ local BaseWorld = Object:extend() function BaseWorld:new(scene) self.scene = scene - self.entities = {} + self.actors = {} end -function BaseWorld:registerEntity(entity) - table.insert(self.entities, entity) +function BaseWorld:registerActor(actor) + table.insert(self.actors, actor) end -function BaseWorld:countEntity() - return #self.entities +function BaseWorld:countActors() + return #self.actors end function BaseWorld:update(dt) - for i,v in ipairs(self.entities) do + for i,v in ipairs(self.actors) do v:update(dt) end end function BaseWorld:draw(dt) - for i,v in ipairs(self.entities) do + for i,v in ipairs(self.actors) do v:draw(dt) end end