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 update = self.Update
local internals = self.internals local internals = self.internals
for k, v in ipairs(internals) do
v:update(dt)
end
-- move to parent if there is a parent -- move to parent if there is a parent
if parent ~= base then if parent ~= base then
self.x = parent.x + self.staticx self.x = parent.x + self.staticx
self.y = parent.y + self.staticy self.y = parent.y + self.staticy
end end
for k, v in ipairs(internals) do
v:update(dt)
end
if update then if update then
update(self, dt) update(self, dt)
end end