diff --git a/gamecore/modules/world/actors/actor2D.lua b/gamecore/modules/world/actors/actor2D.lua index 508d88c..af1ec70 100644 --- a/gamecore/modules/world/actors/actor2D.lua +++ b/gamecore/modules/world/actors/actor2D.lua @@ -59,15 +59,6 @@ function Actor2D:setBounceFactor(newBounceFactor) self.bounceFactor = newBounceFactor or 0 end --- UPDATE FUNCTIONS --- Theses functions are activated every steps - -function Actor2D:update(dt) - self:updateTimers(dt) - self:autoMove(dt) - self:updateSprite(dt) -end - -- MOVEMENT FUNCTIONS -- Basic functions from the movement. diff --git a/gamecore/modules/world/actors/baseactor.lua b/gamecore/modules/world/actors/baseactor.lua index 6cbef3b..7f91ac9 100644 --- a/gamecore/modules/world/actors/baseactor.lua +++ b/gamecore/modules/world/actors/baseactor.lua @@ -64,6 +64,21 @@ function BaseActor:destroy() self.isDestroyed = true end +-- UPDATE FUNCTIONS +-- Theses functions are activated every steps + +function BaseActor:update(dt) + self:updateTimers(dt) + self:autoMove(dt) + self:updateSprite(dt) +end + +function BaseActor:autoMove(dt) + -- The base actor don't have coordinate + -- so the autoMove is only usefull to its + -- 2D and 3D childrens +end + -- INPUT FUNCTIONS -- get input from the world object