Commit 0e03f8be by BellCodeEditor

save project

parent bb9c2c47
Showing with 8 additions and 4 deletions
......@@ -15,7 +15,7 @@ apple = pygame.image.load('bush.png') # 灌木丛
hero = [pygame.image.load('hero1.png'),pygame.image.load('hero2.png'),pygame.image.load('hero3.png'),pygame.image.load('hero4.png'),pygame.image.load('hero5.png')]
index = 0
f=30
c='runing'
y=400
while True:
......@@ -33,14 +33,18 @@ while True:
c='up'
if c=='up':
if y>150:
y=y-5
y-=f
f-=2
else:
c='down'
if c=='down':
if y<400:
y=y+5
if y<30:
y+=f
f+=2
else:
c='runing'
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
screen.blit(b, (150, y))
......
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