Ah.. stuff
parent
0bbda0fd42
commit
dcf74de266
4
game.py
4
game.py
|
@ -136,12 +136,12 @@ class TheGame:
|
||||||
self.drawBackground()
|
self.drawBackground()
|
||||||
|
|
||||||
# Next level?
|
# Next level?
|
||||||
if score >= targetScore:
|
if (score * level) >= (targetScore * level):
|
||||||
self.score = 0
|
|
||||||
level += 1
|
level += 1
|
||||||
levelChange = 35
|
levelChange = 35
|
||||||
timeleft = time
|
timeleft = time
|
||||||
avocados = []
|
avocados = []
|
||||||
|
print('DEBUG :: Score: ' + str(score))
|
||||||
print('DEBUG :: Level ' + str(level))
|
print('DEBUG :: Level ' + str(level))
|
||||||
self.playLevel(level)
|
self.playLevel(level)
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Hud:
|
||||||
self.screen = screen
|
self.screen = screen
|
||||||
self.screen_width, self.screen_height = screen.get_size()
|
self.screen_width, self.screen_height = screen.get_size()
|
||||||
self.font = pygame.font.Font(None, 30)
|
self.font = pygame.font.Font(None, 30)
|
||||||
self.hud = pygame.Surface((self.screen_width, 30))
|
self.hud = pygame.Surface((self.screen_width, 25))
|
||||||
|
|
||||||
def draw_hud(self, score, timeleft, fps):
|
def draw_hud(self, score, timeleft, fps):
|
||||||
self.hud.fill(BLACK)
|
self.hud.fill(BLACK)
|
||||||
|
|
Loading…
Reference in New Issue