New lighting!
This commit is contained in:
@@ -5,11 +5,11 @@ Camera = {
|
||||
}
|
||||
|
||||
function Camera:CenterAt(x,y,cx,cy)
|
||||
self.pos.x = x-self.width/(2*game.scale)
|
||||
self.pos.y = y-self.height/(2*game.scale)
|
||||
cx = cx - self.width
|
||||
cy = cy - self.height
|
||||
self.pos.x = x-self.width/game.scale/2
|
||||
self.pos.y = y-self.height/game.scale/2
|
||||
if not (cx == nil or cy == nil) then
|
||||
cx = cx - self.width
|
||||
cy = cy - self.height
|
||||
if self.pos.x > cx then self.pos.x = cx end
|
||||
if self.pos.y > cy then self.pos.y = cy end
|
||||
if self.pos.x < 0 then self.pos.x = 0 end
|
||||
|
||||
Reference in New Issue
Block a user