Commit 5037c98f by BellCodeEditor

save project

parent 508074d8
Showing with 2 additions and 21 deletions
...@@ -9,24 +9,4 @@ while True ...@@ -9,24 +9,4 @@ while True
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit
if event.type == locals.KEYDOWN \ No newline at end of file
if event.key == locals.K_RIGHT and setheading !="left"
setheading = 'right'
if event.key == locals.K_RIGHT and setheading !="left"
setheading = 'left'
if event.key == locals.K_RIGHT and setheading !="left"
setheading = 'up'
if event.key == locals.K_RIGHT and setheading !="left"
setheading = 'down
if setheading == "right":
x += 30
elif setheading == "left":
y -= 30
elif setheading == "up":
y += 30
elif
y += 30
x +=30
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