sep-pm-platformer/project/sprite/BoundingBox.py

17 lines
380 B
Python

class BoundingBox:
def __init__(self, x, y, width, height):
self.x = x
self.y = y
self.width = width
self.height = height
def get_dimensions(self):
return self.width, self.height
def get_position(self):
return self.x, self.y
def __str__(self):
return f"({self.x}, {self.y}, {self.width}, {self.height})"