Commit de68f055 by BellCodeEditor

save project

parent 72f08bd7
Showing with 8 additions and 2 deletions
......@@ -17,6 +17,7 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
index = 0
G=5
y=400
IM='running'
......@@ -35,13 +36,18 @@ while True:
IM='up'
if IM=='up':
if y>150:
y-=5
y-=2*G
G-=0.05
else:
IM='down'
if IM=='down':
if y<=400:
y+=5
y+=2*G
G+=0.2
else:
G=5
if y>400:
y=400
if IM!='up':
IM='running'
herorun=hero[index]
......
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