Commit 9a80da19 by BellCodeEditor

save project

parent e9484941
Showing with 6 additions and 2 deletions

8.05 KB | W: | H:

7.94 KB | W: | H:

r.png
r.png
r.png
r.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -20,6 +20,10 @@ while True: ...@@ -20,6 +20,10 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if event.type==locals.KEYDOWN:
if event.type==
x+=30 x+=30
sss.append((x,y)) sss.append((x,y))
sss.pop(0) sss.pop(0)
...@@ -38,4 +42,4 @@ while True: ...@@ -38,4 +42,4 @@ while True:
screen.blit(food, (360, 300)) screen.blit(food, (360, 300))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
s.tick(2) s.tick(6)
\ No newline at end of file \ 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