Fixed next level msg
parent
af9c1de586
commit
f11f6f3c2e
|
@ -76,8 +76,8 @@ class Avocado:
|
|||
|
||||
|
||||
def exists(self):
|
||||
# return not self.has_been_pinned and self.is_still_falling
|
||||
return self.is_still_falling
|
||||
return not self.has_been_pinned and self.is_still_falling
|
||||
# return self.is_still_falling
|
||||
|
||||
|
||||
def isPinned(self):
|
||||
|
@ -100,7 +100,7 @@ class Avocado:
|
|||
def hasLanded(self):
|
||||
if self.rect.bottom > self.screen_height or self.rect.top < 0:
|
||||
self.is_still_falling = False
|
||||
print('DEBUG :: splatsh!')
|
||||
print('DEBUG :: splash!')
|
||||
return True
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,9 @@ class Crystal:
|
|||
self.imageCenterX = self.screen.get_rect().centerx
|
||||
self.imageCenterY = self.screen.get_rect().centery
|
||||
|
||||
def blitme(self):
|
||||
pygame.draw.ellipse(self.screen, self.color, (self.imageCenterX-158,self.imageCenterY-5,277,217), 0)
|
||||
|
||||
def setColor(self, color):
|
||||
""" Announces the color to pin by drawing a rectangle
|
||||
and filling it with a color """
|
||||
pygame.draw.ellipse(self.screen, (color), (self.imageCenterX-158,self.imageCenterY-5,277,217), 0)
|
||||
print("Drawing {} ellipse".format(color))
|
||||
self.color = color
|
||||
|
||||
|
|
7
game.py
7
game.py
|
@ -121,6 +121,7 @@ class TheGame:
|
|||
|
||||
# Initial color indication
|
||||
color = self.chooseRandomColor()
|
||||
crystalBall.setColor(color)
|
||||
|
||||
# We could use this list for redrawing only this part
|
||||
# of the screen install of all of it
|
||||
|
@ -134,11 +135,12 @@ class TheGame:
|
|||
|
||||
# Redraw the background and put our lawyer back on top
|
||||
self.drawBackground()
|
||||
crystalBall.blitme()
|
||||
|
||||
# Next level?
|
||||
if (score * level) >= (targetScore * level):
|
||||
if score >= (targetScore * level):
|
||||
level += 1
|
||||
levelChange = 35
|
||||
levelChange = 70
|
||||
timeleft = time
|
||||
avocados = []
|
||||
print('DEBUG :: Score: ' + str(score))
|
||||
|
@ -159,7 +161,6 @@ class TheGame:
|
|||
|
||||
# Redraw the HUD
|
||||
the_hud.draw_hud(score, displaytime, round(fps, 2))
|
||||
crystalBall.setColor(color)
|
||||
|
||||
# If we're not currently in between levels…
|
||||
if levelChange == 0:
|
||||
|
|
Loading…
Reference in New Issue