mirror of
https://github.com/13hannes11/outyard-hackathon-rush-hour-co2.git
synced 2024-09-03 20:10:59 +02:00
replace bubbles by actual images
Co-authored-by: Laura Januleviciute <januleviciute.laura@gmail.com>
This commit is contained in:
@@ -2,16 +2,17 @@ import pygame
|
||||
import random
|
||||
|
||||
class Bubble:
|
||||
def __init__(self, posX, posY, radius = 1, color=(0,0,255), direction=(1,1)):
|
||||
def __init__(self, posX, posY, image, radius = 1, color=(0,0,255), direction=(1,1)):
|
||||
self.posX = posX
|
||||
self.posY = posY
|
||||
self.radius = radius
|
||||
self.color = color
|
||||
self.directionX = direction[0]
|
||||
self.directionY = direction[1]
|
||||
self.image = image
|
||||
|
||||
def draw(self, screen):
|
||||
pygame.draw.circle(screen, self.color, (self.posX, self.posY), self.radius)
|
||||
screen.blit(self.image, (self.posX - self.radius, self.posY - self.radius))
|
||||
|
||||
def update(self, screen):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user