Commit 23184f7f by BellCodeEditor

save project

parent b7cdc526
Showing with 3 additions and 3 deletions
......@@ -7,7 +7,7 @@ pygame.init()
# 创建一个窗口
screen = pygame.display.set_mode((660, 480))
a = pygame.time.Clock()#时钟控制游戏速度,(帧数)
FPSCLOCK = pygame.time.Clock()#时钟控制游戏速度,(帧数)
# 背景
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
......@@ -33,4 +33,4 @@ while True:
screen.blit(food, (360, 300))
# 刷新画面
pygame.display.update()
a.tick(3)
\ No newline at end of file
FPSCLOCK.tick(3)
\ 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