- More cleanup
- Added kupos entity and sprites (body, bow) - Finally understood my code
This commit is contained in:
@@ -13,9 +13,11 @@ function Camera:CenterAt(x,y,cx,cy)
|
||||
if self.pos.y < 0 then self.pos.y = 0 end
|
||||
if self.pos.y > cy then self.pos.y = cy end
|
||||
end
|
||||
self.pos.x = math.floor(self.pos.x)
|
||||
self.pos.y = math.floor(self.pos.y)
|
||||
end
|
||||
|
||||
function Camera:ScreenAt(x,y,width,height)
|
||||
self.pos.x = math.floor(x/width)*width
|
||||
self.pos.y = math.floor(y/height)*height
|
||||
function Camera:ScreenAt(x,y)
|
||||
self.pos.x = math.floor(x/self.width)*self.width
|
||||
self.pos.y = math.floor(y/self.height)*self.height
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user