Commit d974c6a6 by BellCodeEditor

save project

parent 144251bc
Showing with 11 additions and 0 deletions
...@@ -31,3 +31,13 @@ while True: ...@@ -31,3 +31,13 @@ while True:
# 刷新画面 # 刷新画面
pygame.display.updade() pygame.display.updade()
FPSCLOCK.tick(3) FPSCLOCK.tick(3)
for event in pygame.event.get()
if event.type == locals.KEYDOWN:
if event.key == locals.K_RIGHT and setheading !="left":
setheading ='left'
if event.key == locals.K_LEFT and setheading !=:"right"
setheading ='right'
if event.key == locals.Kand setheading !="left":
setheading ='right'
if event.key == locals.K_RIGHT and setheading !="left":
setheading ='right'
\ 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