trashbin dimensions depends on its type
This commit is contained in:
parent
fdce554007
commit
de18a3ae75
15
trashbin.py
15
trashbin.py
@ -5,13 +5,20 @@ class trashbin(pygame.sprite.Sprite):
|
|||||||
def __init__(self,x,y,img, type):
|
def __init__(self,x,y,img, type):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
# dimensions
|
|
||||||
self.width = 16
|
|
||||||
self.height = 16
|
|
||||||
|
|
||||||
# trashbin type
|
# trashbin type
|
||||||
self.type = type
|
self.type = type
|
||||||
|
|
||||||
|
# dimensions
|
||||||
|
if type == "small":
|
||||||
|
self.width = 4
|
||||||
|
self.height = 4
|
||||||
|
elif type == "medium":
|
||||||
|
self.width = 8
|
||||||
|
self.height = 8
|
||||||
|
elif type == "large":
|
||||||
|
self.width = 16
|
||||||
|
self.height = 16
|
||||||
|
|
||||||
# spawn coords
|
# spawn coords
|
||||||
self.x = x
|
self.x = x
|
||||||
self.y = y
|
self.y = y
|
||||||
|
Loading…
Reference in New Issue
Block a user