Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Drop():
- def __init__(self, x, y, speed):
- self.x = x
- self.y = y
- self.speed = speed
- def randomize(self):
- self.x = random.randint(0, WIDTH-2)
- self.y = random.randint(-700, -10)
- self.speed = random.randint(1, 2)
- return self.x, self.y, self.speed
- def update(self):
- self.y += self.speed
- self.dropRect = (self.x, self.y, 1, 20)
- def show(self):
- pygame.draw.rect(canvas, BLUE, self.dropRect, 1)
Advertisement
Add Comment
Please, Sign In to add comment