Commit 8873a8d4 by BellCodeEditor

auto save

parent 2e0825ca
Showing with 6 additions and 5 deletions
import random
import pygame,sys
pygame.init()
import pygame
from pygame import locals
x,y=240,120
apple_x,apple_y=360,300
......@@ -19,6 +18,7 @@ sj=pygame.time.Clock()
screen = pygame.display.set_mode((660, 480))
# 背景
a=pygame.image.load('a.png')
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
......@@ -82,9 +82,9 @@ while True:
# screen.blit(body, (180,90))
# 将果实画上去
screen.blit(food, (apple_x, apple_y))
print(pygame.font.get_fonts())
self.font=pygame.font.SysFont(None,48)
self.font = pygame.font.SysFont('arial',48)
#print(pygame.font.get_fonts())
#self.font=pygame.font.SysFont(None,48)
#self.font = pygame.font.SysFont('arial',48)
# 刷新画面
pygame.display.update()
sj.tick(4)
\ 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