Commit ba3dc7e4 by BellCodeEditor

save project

parent d4ee4bde
Showing with 6 additions and 3 deletions
...@@ -2,6 +2,7 @@ import pygame ...@@ -2,6 +2,7 @@ import pygame
from pygame import locals from pygame import locals
import os import os
pygame.init() # 初始化 pygame.init() # 初始化
myfont=pygame.font.Font("neuropol.ttf",15)
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((640, 480)) screen = pygame.display.set_mode((640, 480))
# 载入图片、资源 # 载入图片、资源
...@@ -89,8 +90,8 @@ while True: ...@@ -89,8 +90,8 @@ while True:
new_logo=pygame.transform.rotate(logo_img,a) new_logo=pygame.transform.rotate(logo_img,a)
newRact=new_logo.get_rect(center=(320,200)) newRact=new_logo.get_rect(center=(320,200))
pos=(newRact[0],newRact[1]) pos=(newRact[0],newRact[1])
play_time = pygame.mixer.music.get_pos() play_time=pygame.mixer.music.get_pos()
play_time = int(play_time/1000) play_time=int(play_time/1000)
play_m=play_time//60 play_m=play_time//60
play_s=play_time%60 play_s=play_time%60
info=str(play_m)+":"+str(play_s) info=str(play_m)+":"+str(play_s)
...@@ -105,6 +106,7 @@ while True: ...@@ -105,6 +106,7 @@ while True:
else: else:
a+=0 a+=0
# 刷新画面 # 刷新画面
text=myfont.render(info,True,(0,0,0))
screen.blit(text,(50,440))
pygame.display.update() pygame.display.update()
FPS.tick(100000000000000000000000000000000000000) FPS.tick(100000000000000000000000000000000000000)
\ 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