Commit 41d680ec by BellCodeEditor

save project

parent 178d1d75
Showing with 10 additions and 3 deletions
...@@ -28,13 +28,20 @@ while True: ...@@ -28,13 +28,20 @@ while True:
if event.key==locals.K_LEFT and setheading!="right": if event.key==locals.K_LEFT and setheading!="right":
setheading="left" setheading="left"
x -=30
if event.key==locals.K_UP and setheading!="down": if event.key==locals.K_UP and setheading!="down":
setheading="up" setheading="up"
y -=30
if event.key==locals.K_DOWN and setheading!="up": if event.key==locals.K_DOWN and setheading!="up":
setheading="down" setheading="down"
y +=30 if setheading == "right":
x += 30
elif setheading == "left":
x -= 30
elif setheading == "up":
y -= 30
else:
y += 30
positon.append((x,y)) positon.append((x,y))
positon.pop(0) positon.pop(0)
# 将背景图画上去 # 将背景图画上去
......
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