diff options
author | Aki <nthirtyone@gmail.com> | 2017-04-06 20:06:12 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-04-06 20:06:12 +0200 |
commit | e9396447537e0c6dedfb55e9a7ffc1e99575d860 (patch) | |
tree | fb721352b3b84a419bcf0f934f78bcd75f7311eb | |
parent | 33b3a93138a9eee40727e9f56373b434ceab1cef (diff) | |
download | roflnauts-e9396447537e0c6dedfb55e9a7ffc1e99575d860.zip roflnauts-e9396447537e0c6dedfb55e9a7ffc1e99575d860.tar.gz roflnauts-e9396447537e0c6dedfb55e9a7ffc1e99575d860.tar.bz2 |
Camera moved to /not/ and cleaned-up a bit
-rw-r--r-- | main.lua | 2 | ||||
-rw-r--r-- | not/Camera.lua (renamed from camera.lua) | 8 |
2 files changed, 4 insertions, 6 deletions
@@ -25,7 +25,7 @@ end -- Require require "not.World" -require "camera" +require "not.Camera" require "not.Menu" require "not.Controller" require "not.Settings" diff --git a/camera.lua b/not/Camera.lua index 2ae7c78..63489f3 100644 --- a/camera.lua +++ b/not/Camera.lua @@ -1,7 +1,5 @@ --- `Camera` +--- `Camera` -- Used in drawing. - --- Metatable of `Camera` Camera = { x = 0, y = 0, @@ -16,7 +14,7 @@ Camera = { origin_y = 0, shake_x = 0, shake_y = 0, - world = nil, -- game world + world = --[[not.World]]nil, } -- Constructor of `Camera` @@ -62,7 +60,7 @@ function Camera:getDestination () end -- Translate points -function Camera:translatePosition(x, y) +function Camera:translatePosition (x, y) local x = x or 0 local y = y or 0 return (x-self.x)*self.scale, (y-self.y)*self.scale |