mirror of
https://github.com/guezoloic/BakersAdventure.git
synced 2026-03-28 18:03:43 +00:00
12 lines
392 B
Python
Executable File
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)) |