Commit b21db6c9 by BellCodeEditor

save project

parent 84b0f5db
Showing with 3 additions and 1 deletions
...@@ -14,7 +14,7 @@ food = pygame.image.load('apple.png') ...@@ -14,7 +14,7 @@ food = pygame.image.load('apple.png')
body = pygame.image.load('body.png') body = pygame.image.load('body.png')
x=240 x=240
y=120 y=120
f=pygame.time.Clock()
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -32,5 +32,6 @@ while True: ...@@ -32,5 +32,6 @@ while True:
screen.blit(food, (360, 300)) screen.blit(food, (360, 300))
x+=30 x+=30
y+=30 y+=30
f.tick(5)
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
\ 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