Commit b4423d29 by BellCodeEditor

save project

parent cc05d750
Showing with 4 additions and 4 deletions
...@@ -29,10 +29,10 @@ while True: ...@@ -29,10 +29,10 @@ while True:
if event.key==locals.K_s and c!="up": if event.key==locals.K_s and c!="up":
c="down" c="down"
d=do d=do
if event.key==locals.K_a and c!="left": if event.key==locals.K_d and c!="left":
c="right" c="right"
d=ri d=ri
if event.key==locals.K_d and c!="right": if event.key==locals.K_a and c!="right":
c="left" c="left"
d=le d=le
# 将背景图画上去\ # 将背景图画上去\
...@@ -55,4 +55,4 @@ while True: ...@@ -55,4 +55,4 @@ while True:
screen.blit(food, (360, 300)) screen.blit(food, (360, 300))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
a.tick(10) a.tick(30)
\ 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