My OOP practice project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
491 B

4 years ago
import pygame
4 years ago
from beings import *
4 years ago
class Surface:
4 years ago
def __init__(self,name):
if str(name) == 'killsurf':
self.width = windowX
self.height = windowY
self.color = (30,70,40)
if str(name) == 'default':
self.width = windowX/1.5
self.height = windowY/1.5
self.color = (50,20,60)
4 years ago
def place(self,window,surf_x,surf_y):
4 years ago
pygame.draw.rect(window,self.color,(surf_x,surf_y,self.width,self.height))