Commit 4d3310dd by BellCodeEditor

save project

parent 578999e6
Showing with 2 additions and 2 deletions
...@@ -25,7 +25,7 @@ while True: ...@@ -25,7 +25,7 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.type == locals.RIGHT and u!='left': if event.type == locals.K_RIGHT and u!='left':
u='right' u='right'
sk=right sk=right
if events.type == locals.LEFT and u!='right': if events.type == locals.LEFT and u!='right':
...@@ -37,7 +37,7 @@ while True: ...@@ -37,7 +37,7 @@ while True:
if event.type == locals.UP and u!='down': if event.type == locals.UP and u!='down':
u='up' u='up'
sk=up sk=up
if u=="right": if u=="sk":
x+=30 x+=30
elif u=="left": elif u=="left":
x-=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