Commit 0b175220 by BellCodeEditor

save project

parent c5511fa2
Showing with 5 additions and 4 deletions
...@@ -16,6 +16,7 @@ left = pygame.image.load('left.png') ...@@ -16,6 +16,7 @@ left = pygame.image.load('left.png')
down = pygame.image.load('down.png') down = pygame.image.load('down.png')
right = pygame.image.load('right.png') right = pygame.image.load('right.png')
up = pygame.image.load('up.png') up = pygame.image.load('up.png')
body = pygame.image.load('body.png')
x,y=240,120 x,y=240,120
pako=[(180, 90),(180, 120),(210, 120),(x, y)] pako=[(180, 90),(180, 120),(210, 120),(x, y)]
setheading="right" setheading="right"
...@@ -40,13 +41,13 @@ while True: ...@@ -40,13 +41,13 @@ while True:
if event.type == locals.K_DOWN and setheading != "up": if event.type == locals.K_DOWN and setheading != "up":
setheading="down" setheading="down"
ghj=down ghj=down
if setheading=="right" if setheading=="right":
x+=30 x+=30
if setheading=="left" elif setheading=="left":
x-=30 x-=30
if setheading=="down" elif setheading=="down":
y+=30 y+=30
if setheading=="up" else
y-=30 y-=30
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