diff --git a/gamecore/modules/world/camera.lua b/gamecore/modules/world/camera.lua index 500ef2f..4427372 100644 --- a/gamecore/modules/world/camera.lua +++ b/gamecore/modules/world/camera.lua @@ -101,4 +101,22 @@ function CameraSystem:detachView(id) end end +function CameraSystem:getViewCoordinate(id) + local cam = self:getViewCam(id) + + local camx, camy, camh, camw + camx = cam.x - (self.views.width/2) + camy = cam.y - (self.views.height/2) + + camw = self.views.width + camh = self.views.height + return camx, camy, camh, camw +end + +function CameraSystem:getViewScale(id) + local cam = self:getViewCam(id) + + return cam.scale +end + return CameraSystem