_
This commit is contained in:
16
GUI/Objects/r_objects/Rect.py
Normal file
16
GUI/Objects/r_objects/Rect.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import pygame.draw
|
||||
|
||||
|
||||
class Rect:
|
||||
|
||||
object_type = "r"
|
||||
|
||||
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)
|
Reference in New Issue
Block a user