diff options
author | Aki <nthirtyone@gmail.com> | 2016-05-19 12:19:04 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-05-19 12:19:04 +0200 |
commit | 06ab90aeb91f4287adf3144778f72ee6a9b5f3c6 (patch) | |
tree | 486b320e7cda154b529086aa92caab9e0c1215a3 /camera.lua | |
parent | 272ae9e4589d4b473641972aa1e7469deff76d1c (diff) | |
download | roflnauts-06ab90aeb91f4287adf3144778f72ee6a9b5f3c6.zip roflnauts-06ab90aeb91f4287adf3144778f72ee6a9b5f3c6.tar.gz roflnauts-06ab90aeb91f4287adf3144778f72ee6a9b5f3c6.tar.bz2 |
Constant(s) changes :> :>
Diffstat (limited to 'camera.lua')
-rw-r--r-- | camera.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -45,7 +45,7 @@ end -- Move follow function Camera:follow () - local x,y,i = 105, 120, 1 + local x,y,i = 145, 90, 1 for k,point in pairs(self.world.Nauts) do if point.body:getX() > -20 and point.body:getX() < 310 and point.body:getY() > -70 and point.body:getY() < 200 then @@ -63,7 +63,7 @@ end function Camera:update (dt) self:follow() local dx, dy = self:getDestination() - dx = (dx - self.x) * 8 * dt - dy = (dy - self.y) * 8 * dt + dx = (dx - self.x) * 6 * dt + dy = (dy - self.y) * 6 * dt self:setPosition(self.x + dx, self.y + dy) end
\ No newline at end of file |