Merge pull request 'add trash class' (#9) from trash_class into master
Reviewed-on: #9
This commit is contained in:
commit
12d2962501
18
trash.py
Normal file
18
trash.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user