Commit ff088a1d by BellCodeEditor

save project

parent 969cbf77
Showing with 5 additions and 5 deletions
...@@ -24,18 +24,18 @@ while True: ...@@ -24,18 +24,18 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if event.type==locals.KEYDOWN: elif event.type==locals.KEYDOWN:
if event.key==locals.K_UP and cx!="down": if event.key==locals.K_UP and cx!="down":
cx=="up" cx="up"
zaoxin=up zaoxin=up
if event.key==locals.K_DOWN and cx!="up": if event.key==locals.K_DOWN and cx!="up":
cx=="down" cx="down"
zaoxin=down zaoxin=down
if event.key==locals.K_LEFT and cx!="right": if event.key==locals.K_LEFT and cx!="right":
cx=="left" cx="left"
zaoxin=left zaoxin=left
if event.key==locals.K_RIGHT and cx!="left": if event.key==locals.K_RIGHT and cx!="left":
cx=="right" cx="right"
zaoxin=right zaoxin=right
if cx=="up": if cx=="up":
y-=30 y-=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