trashbin_class #7
19
trashbin.py
Normal file
19
trashbin.py
Normal file
@ -0,0 +1,19 @@
|
||||
import pygame.image
|
||||
|
||||
class trashbin(pygame.sprite.Sprite):
|
||||
|
||||
def __init__(self,x,y,img):
|
||||
super().__init__()
|
||||
|
||||
# dimensions
|
||||
self.width = 16
|
||||
self.height = 16
|
||||
|
||||
# spawn coords
|
||||
self.x = 0
|
||||
self.y = 0
|
||||
|
||||
# load trashbin image
|
||||
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