diff --git a/Vacuum.py b/Vacuum.py index e37c2f0..633d90b 100644 --- a/Vacuum.py +++ b/Vacuum.py @@ -1,5 +1,7 @@ import pygame import random + +from pygame import image from Bubble import Bubble class Vacuum: @@ -11,14 +13,21 @@ class Vacuum: self.tube_width = 10 self.bubble_objects = bubble_objects self.image = pygame.image.load("sprites/vacuum.png") + self.image_body = pygame.image.load("sprites/vacuum_body.png") def draw(self, screen): + screen_width, screen_height = screen.get_size() + + screen.blit(self.image_body, + ((screen_width - self.image_body.get_width()) / 2, + screen_height - (self.image_body.get_height() / 3.3))) screen.blit(self.image, (self.posX, self.posY)) pygame.draw.line(screen, - (255, 0,0 ), - (400,600), + (49, 86, 130), + (screen_width / 2 - 20, screen_height - 30), (self.posX + (self.width - self.tube_width) / 2 , self.posY + self.height), width=self.tube_width) + def update(self, screen): x, y = pygame.mouse.get_pos() diff --git a/sprites/vacuum_body.png b/sprites/vacuum_body.png new file mode 100644 index 0000000..af08fd1 Binary files /dev/null and b/sprites/vacuum_body.png differ