Skip to content

Commit

Permalink
Reverted sound mechanics
Browse files Browse the repository at this point in the history
  • Loading branch information
CptZee committed Sep 19, 2023
1 parent a9f7b84 commit d39cdfd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def main():

pygame.display.set_icon(icon_image)

music.play(loops=-1)
music.set_volume(0.2)

RestartGame()
while run:
RunGame()
Expand All @@ -82,7 +85,7 @@ def ObstaclePair() :
obstacles.append(Obstacle("UP", 900, 600-(r+125)))
global score
score += 1
if score > -1:
if score > 0:
point_sound.play()

def AnimateRoof() :
Expand Down Expand Up @@ -122,11 +125,6 @@ def RunGame():
if started != True :
DisplayIndicator(["Press 'space bar' or 'click' to start the game",
"Press 'esc' to exit the game"], -100)
if score == 0:
music.play(loops=-1)
music.set_volume(0.2)
else:
music.stop()
if score >= 0:
DisplayIndicator(["Score: " + str(score),
"Highscore: " + str(highscore)], 220)
Expand Down

0 comments on commit d39cdfd

Please sign in to comment.