Commit 381f526c by BellCodeEditor

auto save

parent 08858819
Showing with 4 additions and 1 deletions
import pygame import pygame
from pygame import locals from pygame import locals
import os import os
Zhuan_Dong = 0
pygame.init() # 初始化 pygame.init() # 初始化
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((640, 480)) screen = pygame.display.set_mode((640, 480))
...@@ -47,9 +47,11 @@ while True: ...@@ -47,9 +47,11 @@ while True:
if click % 2 == 0: if click % 2 == 0:
play_button = stop_img play_button = stop_img
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
Zhuan_Dong = 0
else: else:
play_button = play_img play_button = play_img
pygame.mixer.music.pause() pygame.mixer.music.pause()
Zhuan_Dong = 1
if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲 if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲
num += 1 num += 1
if num > len(music_list) - 1: if num > len(music_list) - 1:
...@@ -80,6 +82,7 @@ while True: ...@@ -80,6 +82,7 @@ while True:
num = 0 num = 0
pygame.mixer.music.load(music_list[num]) pygame.mixer.music.load(music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
if Zhuan_Dong == 0:
new_logo = pygame.transform.rotate(logo_img,Xuan_Zhuan) new_logo = pygame.transform.rotate(logo_img,Xuan_Zhuan)
new_xy = new_logo.get_rect(center=(320,200)) new_xy = new_logo.get_rect(center=(320,200))
......
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