Commit 1adf2c9b by BellCodeEditor

save project

parent 0ebeaf20
Showing with 10 additions and 2 deletions
......@@ -31,4 +31,12 @@ while True:
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(3)
\ No newline at end of file
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='left'
if event.key==locals.K_UP and setheading !="down"
setheading='up'
if event.key==locals.K_DOWN and setheading !="up"
setheading='down'
\ 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