Commit 760a34ac by BellCodeEditor

save project

parent b5055671
Showing with 10 additions and 1 deletions
import pygame
from pygame import locals
l9 = 0
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
......@@ -29,6 +29,15 @@ while True:
if qqwwee<1:
qqwwee=0
pygame.mixer.music.set_volume(qqwwee)
if event.type ==locals.MOUSEBUTTONDOWN:
l9 += 1
if l9 % 2 == 0:
play_button = stop_img
pygame.mixer.music.unpause()
else:
play_button = play_img
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy()==False:
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