add trash class #9

Merged
s462072 merged 1 commits from trash_class into master 2022-03-25 11:51:04 +01:00
Showing only changes of commit 286623398f - Show all commits

18
trash.py Normal file
View File

@ -0,0 +1,18 @@
import pygame.image
class trash(pygame.sprite.Sprite):
def __init__(self,x,y,img, type):
super().__init__()
self.width=16
self.height=16
self.type = type
self.x = x
self.y = y
self.image = pygame.image.load(img)
self.image = pygame.transform.scale(self.image, (self.x,self.y))
self.rect = self.image.get_rect()