Files
BakersAdventure/assets/Rect.py
2026-03-27 15:34:24 +01:00

12 lines
392 B
Python
Executable File

import pygame
from game.settings import*
class Page:
def __init__(self, top, left, width, height, rgb = (0, 0, 0)):
self.rgb = rgb
self.width = width
self.height = height
self.draw = pygame.draw.rect(SCREEN, self.rgb, pygame.Rect(top, left, self.width, self.height))
def collision(self, x, y):
return self.draw.collidepoint((x, y))