Commit c8a76444 by BellCodeEditor

save project

parent 6beeb85c
Showing with 9 additions and 2 deletions
......@@ -15,13 +15,20 @@ body = pygame.image.load('body.png')
x = 240
y = 120
FPSC=pygame.time.Clock()
setheding = "right"
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
x+=30
if event.key == locals.K_DOWN and setheding!="up":
setheding="down"
if event.key == locals.K_UP and setheding!="down":
setheding="up"
if event.key == locals.K_LEFT and setheding!="right":
setheding="left"
if event.key == locals.K_RIGHT and setheding!="left":
setheding="right"
PA.append((x,y))
PA.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