mirror of
https://github.com/13hannes11/outyard-hackathon-rush-hour-co2.git
synced 2024-09-03 20:10:59 +02:00
add image for vacuum cleaner
Co-authored-by: Laura Januleviciute <januleviciute.laura@gmail.com>
This commit is contained in:
@@ -6,13 +6,14 @@ class Vacuum:
|
||||
def __init__(self, bubble_objects):
|
||||
self.posX = -50
|
||||
self.posY = -50
|
||||
self.width = 50
|
||||
self.height = 50
|
||||
self.width = 124
|
||||
self.height = 57
|
||||
self.bubble_objects = bubble_objects
|
||||
self.image = pygame.image.load("sprites/vacuum.png")
|
||||
|
||||
def draw(self, screen):
|
||||
pygame.draw.rect(screen, (255, 0, 0), pygame.Rect(self.posX, self.posY, self.width, self.height))
|
||||
|
||||
screen.blit(self.image, (self.posX, self.posY))
|
||||
|
||||
def update(self, screen):
|
||||
x, y = pygame.mouse.get_pos()
|
||||
self.posX = x -(self.width / 2)
|
||||
|
||||
Reference in New Issue
Block a user