Commit ee28600c by BellCodeEditor

save project

parent 6d209cf7
...@@ -81,11 +81,16 @@ while True: ...@@ -81,11 +81,16 @@ while True:
num += 1 num += 1
if num > len(music_list)-1: if num > len(music_list)-1:
num = 0 num = 0
pygame.mixer.music.load(path + music_list[num]) pygame.mixer.music.load(path + "\\"+music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
new_logo = pygame.transform.rotate(logo_img, angle) new_logo = pygame.transform.rotate(logo_img, angle)
newrect=new_logo.get_rect(center=(320,200)) newrect=new_logo.get_rect(center=(320,200))
pos=(newrect(0),newrect(1)) pos=(newrect(0),newrect(1))
playtime=pygame.mixer.music.get_pos()
playtime=int(playtime/1000)
m=playtime//60
s=playtime%60
info=str(m)+":"+str(s)
if play_button == stop_img: if play_button == stop_img:
angle += 1 angle += 1
screen.blit(bg_img, (0, 0)) screen.blit(bg_img, (0, 0))
......
import pygame
from pygame import locals
pygame.init()
screen=pygame.display.set_mode((420,540))
music1=pygame.mixer.Sound("歌曲1.wav")
music2=pygame.mixer.Sound("歌曲2.wav")
music1.play()
music2.play()
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
path="C:\\Users\\Administrator\\Desktop\\tast"
kunkun=os.listdir(path)
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