2021-09-01 11:26:29 +02:00
|
|
|
import pygame.draw
|
|
|
|
|
|
|
|
|
|
|
|
class Rect:
|
2021-09-06 18:32:02 +02:00
|
|
|
|
|
|
|
object_type = "r"
|
|
|
|
|
2021-09-01 11:26:29 +02:00
|
|
|
def __init__(self, pos, size, color, scene):
|
|
|
|
self.pos = pos
|
|
|
|
self.size = size
|
|
|
|
self.color = color
|
|
|
|
self.rect = pygame.Rect(self.pos, self.size)
|
|
|
|
self.scene = scene
|
|
|
|
|
|
|
|
def blit(self):
|
|
|
|
pygame.draw.rect(self.scene.s_, self.color, self.rect)
|