Commit 752c21f7 by BellCodeEditor

save project

parent 4cc6cb6a
Showing with 3 additions and 3 deletions
......@@ -16,11 +16,11 @@ x,y=240,120
heading = "right"
position=[(180,90),(180,120),(210,120),(x,y)]
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
for e in pygame.event.get():
if e.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if e.key == locals.KEYDOWN:
if e.type == locals.KEYDOWN:
if e.key == locals.K_RIGHT and heading != "left":
heading = "right"
elif e.key == locals.K_LEFT and heading != "right":
......
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