Commit aef61162 by BellCodeEditor

save project

parent 0328c340
Showing with 10 additions and 6 deletions
...@@ -21,6 +21,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -21,6 +21,7 @@ hero = [pygame.image.load('hero1.png'),
m = 0 m = 0
j="runing" j="runing"
y=400 y=400
t=30
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -32,15 +33,18 @@ while True: ...@@ -32,15 +33,18 @@ while True:
if j =="runing": if j =="runing":
j="up" j="up"
if j =="up": if j =="up":
if y >150: if t>0:
y=y-5 y=y-t
t-=2
else: else:
j="down" j="down"
if j=="down": if j =="down":
if y<400: if t<=30:
y=y+5 y=y+t
t+=2
else: else:
j="runing" j="runing"
t=30
hero1=hero[m] hero1=hero[m]
......
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