- More cleanup

- Added kupos entity and sprites (body, bow)
- Finally understood my code
This commit is contained in:
lustlion
2021-10-22 18:23:05 +02:00
parent 966aebf046
commit 5b7924fe4e
157 changed files with 394 additions and 1159 deletions

View File

@@ -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