diff --git a/objects/internal/scrollable/scrollbody.lua b/objects/internal/scrollable/scrollbody.lua index e82cf78..cf38384 100644 --- a/objects/internal/scrollable/scrollbody.lua +++ b/objects/internal/scrollable/scrollbody.lua @@ -142,16 +142,16 @@ function newobject:update(dt) local update = self.Update local internals = self.internals - for k, v in ipairs(internals) do - v:update(dt) - end - -- move to parent if there is a parent if parent ~= base then self.x = parent.x + self.staticx self.y = parent.y + self.staticy end + for k, v in ipairs(internals) do + v:update(dt) + end + if update then update(self, dt) end