Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Camera:
- def __init__(self, Width, Height):
- self.X = 0
- self.Y = 0
- self.AnchorX = 0.5
- self.AnchorY = 0.5
- self.Width = Width
- self.Height = Height
- def anchorPoint(self, X, Y):
- self.AnchorX = X
- self.AnchorY = Y
- def translate(self, X, Y):
- self.X = X
- self.Y = Y
- def relative(self, X, Y):
- return (self.Width * self.AnchorX) + self.X + X, (self.Height * self.AnchorY) + self.Y + Y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement