From 90a2458c11f533d2c70f49d8b3099b6c328d7365 Mon Sep 17 00:00:00 2001 From: Kenny Shields Date: Sat, 20 Sep 2014 14:03:08 -0400 Subject: [PATCH] Update scrollbody internals after the object is positioned --- objects/internal/scrollable/scrollbody.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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