Commit 8b3f390a by BellCodeEditor

save project

parent 2c4da8bb
Showing with 3 additions and 1 deletions
import pygame import pygame
from pygame import locals from pygame import locals
SY=0
pygame.init() # 初始化 pygame.init() # 初始化
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((640, 480)) screen = pygame.display.set_mode((640, 480))
...@@ -12,10 +12,12 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,10 +12,12 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load("歌曲3.wav") pygame.mixer.music.load("歌曲3.wav")
pygame.mixer.music.set_volume(SY)
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
if SY != 0 and KEYDONG
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