Commit 4256beb3 by BellCodeEditor

save project

parent 26cd6649
Showing with 16 additions and 7 deletions
import pygame
pygame.init()
screen=pygame.display.set_mode((660,480))
while True:
\ No newline at end of file
...@@ -33,13 +33,16 @@ while True: ...@@ -33,13 +33,16 @@ while True:
v=0 v=0
pygame.mixer.music.set_volume(v) pygame.mixer.music.set_volume(v)
if event.type==locals.MOUSEBUTTONDOWN: if event.type==locals.MOUSEBUTTONDOWN:
c+=1 if event.button==1:
if c%2==0: x,y=event.pos
pygame.mixer.music.unpause() if x>270 and x<370 and y>350 and y<450:
button=stop_img c+=1
else: if c%2==0:
pygame.mixer.music.pause() pygame.mixer.music.unpause()
button=play_img button=stop_img
else:
pygame.mixer.music.pause()
button=play_img
if pygame.mixer.music.get_busy()==False: if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play() pygame.mixer.music.play()
......
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