Commit 65034563 by BellCodeEditor

save project

parent fba5d631
Showing with 13 additions and 1 deletions
...@@ -4,7 +4,6 @@ from pygame import locals ...@@ -4,7 +4,6 @@ from pygame import locals
pygame.init() # 初始化 pygame.init() # 初始化
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((640, 480)) screen = pygame.display.set_mode((640, 480))
screen
# 载入图片、资源 # 载入图片、资源
bg_img = pygame.image.load('background.png') # 背景图 bg_img = pygame.image.load('background.png') # 背景图
play_img = pygame.image.load('play.png') # 播放按钮 play_img = pygame.image.load('play.png') # 播放按钮
......
import pygame
from pygame import locals
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
pygame.mixer.music.load('歌曲4.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
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