Commit 67344082 by BellCodeEditor

save project

parent f17a1cb4
Showing with 8 additions and 4 deletions
......@@ -18,6 +18,7 @@ apple = pygame.image.load('bush.png') # 灌木丛
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
index = 0
t=30
y=400
jumpstate="running"
while True:
......@@ -30,15 +31,18 @@ while True:
jumpstate="up"
if jumpstate=="up":
if y>=150:
y-=5
if t>0:
y-=t
t-=5
else:
jumpstate="down"
if jumpstate=="down":
if y<=400:
y+=5
if t<=30:
y+=t
t+=5
else:
jumpstate="running"
t=30
index+=1
if index>4:
......
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