Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / pygame_lesson5_diy1

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 24e14683 authored a year ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

auto save

parent 19e866e6 c354443l1373p256a14105/T737784
Hide whitespace changes
Inline Side-by-side
Showing with 5 additions and 4 deletions
  • Dmitri.mp3
  • my_music.py
  • 全素妍.mp3
  • 植松伸夫.mp3
Dmitri.mp3 0 → 100644
View file @ 24e14683
File added
This diff is collapsed. Click to expand it.
my_music.py
View file @ 24e14683
......@@ -10,16 +10,15 @@ play_img = pygame.image.load('play.png') # 播放按钮
stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
pygame.mixer.music.load('歌曲1.wav') # 载入音乐
logo_img = pygame.image.load('logo.png') # 下一曲按钮
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
music_list = ["歌曲1.wav","全素妍.mp3","植松伸夫.mp3","Dmitri.mp3"]
num = 0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -52,6 +51,8 @@ while True:
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() == False:
num = (num+1)%4
pygame.mixer.music.load(music_list[num])
pygame.mixer.music.play()
# 绘制画面
......
This diff is collapsed. Click to expand it.
全素妍.mp3 0 → 100644
View file @ 24e14683
File added
This diff is collapsed. Click to expand it.
植松伸夫.mp3 0 → 100644
View file @ 24e14683
File added
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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