Commit 1b46dd4a by BellCodeEditor

save project

parent a3510bc6
Showing with 21 additions and 6 deletions
...@@ -19,10 +19,25 @@ while True: ...@@ -19,10 +19,25 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
# 将背景图画上去 # 将背景图画上去
elif event.type==locals.OULT elif event.type==locals.KEYDOWN
if event.key==locals.K_RLYDOWN: if event.key==locals.K_LEFT and setheading !="left"
setheading = 'right' setheading = 'right'
snack_head = right snack_head = right
if event.key==locals.K_LEFT and setheading != "left" if event.key==locals.K_LEFT and setheading != "reght"
setheading = 'right' setheading = 'left'
s snack_head = K_LEF
\ No newline at end of file if event.key==locals.K_UP and setheading != "down"
setheading='up'
snack_head=up
if event.key==locals.K_DOWN and setheading !="up"
setheading='down'
snack_head=down
if setheading == "right":
x+=30
elif setheading == "lift":
x-=30
elif setheading == "up":
y-=30
else:
y+=30
\ No newline at end of file
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