Commit 2f169977 by BellCodeEditor

save project

parent a422c83c
Showing with 7 additions and 2 deletions
import pygame
import random
from pygame import locals
pygame.init() # 初始化
......@@ -22,9 +23,13 @@ while True:
exit()
# 将背景图画上去
BeiJingTu = pygame.image.load('bg.png')
screen.blit(background,(0,0))
# 得分
pygame.render(socre,350,70)
myfont=font.render(str(score),True,(26,199,97,))
screen.blit(myfont,(350,70))
pygame.draw.rect(screen,(255,0,0),(120,20,40,20),0)
pygame.draw.rect(screen,(255,255,255),(120,20,40,20),0)
# 刷新画面
pygame.display.update()
clock.tick(FPS)
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