- no plays sound on-click

master
Steve Clement 2014-08-30 23:05:20 +02:00
parent 5bcaf35aca
commit ae2144c293
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,7 @@ class TheGame:
time = timeleft = 30 time = timeleft = 30
level = 1 level = 1
font = pygame.font.Font(None, 40) font = pygame.font.Font(None, 40)
avoClick = game.loadClick()
# I don't know, should we move this text out of the way? # I don't know, should we move this text out of the way?
game_over = font.render('GAME OVER', 0, RED) game_over = font.render('GAME OVER', 0, RED)
@ -154,6 +155,7 @@ class TheGame:
for event in pygame.event.get(): for event in pygame.event.get():
# Collision detection # Collision detection
if event.type == MOUSEBUTTONDOWN: if event.type == MOUSEBUTTONDOWN:
avoClick.play()
for avo in avocados: for avo in avocados:
hit = avo.isHit(pygame.mouse.get_pos()) hit = avo.isHit(pygame.mouse.get_pos())
if hit: if hit: