summaryrefslogtreecommitdiffstats
path: root/box.py
blob: d43b2bbed2a9a8735acc9b43db248b1cb32d818c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pygame

from colours import *


class Box:
    line_thickness = 5

    def __init__(self, position, width, height):
        self.position = pygame.Vector2(position)
        self.width = width
        self.height = height

        self.left = self.position.x
        self.right = self.position.x + self.width
        self.top = self.position.y
        self.bottom = self.position.y + self.height

    def update(self, delta):
        pass

    def draw(self, surf):
        pygame.draw.rect(surf, GRAY, pygame.Rect(self.left, self.top, self.width, self.height), self.line_thickness)