mirror of
https://github.com/guezoloic/BakersAdventure.git
synced 2026-03-31 11:01:36 +00:00
add oldproject folder
This commit is contained in:
12
assets/Rect.py
Executable file
12
assets/Rect.py
Executable file
@@ -0,0 +1,12 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user