Commit f15bd0c6 by BellCodeEditor

save project

parent c6c2d532
Showing with 3 additions and 3 deletions
...@@ -39,12 +39,13 @@ while True: ...@@ -39,12 +39,13 @@ while True:
if volume > 1: if volume > 1:
volume = 1 volume = 1
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.key == locals.K_s: if event.key == locals.K_s:
volume -= 0.1 volume -= 0.1
if volume < 0: if volume < 0:
volume = 0 volume = 0
play_button = play_img
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.type == locals.MOUSEBUTTONDOWN: if event.type == locals.MOUSEBUTTONDOWN:
if event.button == 1: if event.button == 1:
x, y = event.pos x, y = event.pos
...@@ -67,7 +68,6 @@ while True: ...@@ -67,7 +68,6 @@ while True:
click += 2 click += 2
else: else:
click += 1 click += 1
if x > 120 and x < 220 and y > 350 and y < 400: if x > 120 and x < 220 and y > 350 and y < 400:
num -= 1 num -= 1
if num < 0: if num < 0:
...@@ -79,7 +79,6 @@ while True: ...@@ -79,7 +79,6 @@ while True:
click += 2 click += 2
else: else:
click += 1 click += 1
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num += 1 num += 1
if num > len(music_list)-1: if num > len(music_list)-1:
...@@ -89,6 +88,7 @@ while True: ...@@ -89,6 +88,7 @@ while True:
new_logo = pygame.transform.rotate(logo_img, angle) new_logo = pygame.transform.rotate(logo_img, angle)
new_Rect = new_logo.get_rect(center = (320,200)) new_Rect = new_logo.get_rect(center = (320,200))
pos = (new_Rect[0],new_Rect[1]) pos = (new_Rect[0],new_Rect[1])
if play_button == stop_img:
angle += 1 angle += 1
screen.blit(bg_img, (0, 0)) screen.blit(bg_img, (0, 0))
screen.blit(play_button, (270, 330)) screen.blit(play_button, (270, 330))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment