Commit d1cfb6d4 by BellCodeEditor

save project

parent 081f22b4
Showing with 5 additions and 4 deletions
...@@ -22,16 +22,17 @@ while True: ...@@ -22,16 +22,17 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if event.key==locals.K_W and c!="down": if event.type == locals.KEYDOWN:
if event.key==locals.K_W and c!="down":
c="up" c="up"
d=up d=up
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_D 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_A and c!="right": if event.key==locals.K_A and c!="right":
c="left" c="left"
d=le d=le
if c=="left": if c=="left":
......
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