Commit 4602414a by BellCodeEditor

save project

parent 29cf30d0
Showing with 696 additions and 2 deletions
import pygame
from pygame import locals
pygame init()
screenn = pygame.display.set_mode((640,480))
pygame.mixer.music.musle.load('歌曲.ogg')
pygame.mixer.music.play()
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
\ No newline at end of file
...@@ -32,6 +32,7 @@ while True: ...@@ -32,6 +32,7 @@ while True:
click += 1 click += 1
if click%2 == 0: if click%2 == 0:
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
pygame.mixer.music.unpause(.)
start = stop_img start = stop_img
else: else:
pygame.mixer.music.pause() pygame.mixer.music.pause()
...@@ -39,10 +40,682 @@ while True: ...@@ -39,10 +40,682 @@ while True:
if volume <=0: if volume <=0:
volume = 0 volume = 0
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play() pygame.mixer.music.play()
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(start, (270, 330)) # 暂停按钮 screen.blit(start, (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