Update scrollbody internals after the object is positioned

This commit is contained in:
Kenny Shields 2014-09-20 14:03:08 -04:00
parent 7451bd5863
commit 90a2458c11

View File

@ -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