Commit 122828c7 by BellCodeEditor

save project

parent e9c65e0a
Showing with 10 additions and 2 deletions
...@@ -18,6 +18,7 @@ hero = pygame.image.load('hero1.png') ...@@ -18,6 +18,7 @@ hero = pygame.image.load('hero1.png')
pygame.image.load('hero4.png') pygame.image.load('hero4.png')
pygame.image.load('hero5.png') pygame.image.load('hero5.png')
index = 0 index = 0
jumpsate="running"
y=400 y=400
while True: while True:
...@@ -29,8 +30,15 @@ while True: ...@@ -29,8 +30,15 @@ while True:
if event.key==locals.K_SPACE if event.key==locals.K_SPACE
jumpsate=="up" jumpsate=="up"
if jumpsate=="up" if jumpsate=="up"
if if y >150
Y-=5
else:
jumpsate=="down"
if jumpsate=="down"
if y <400
Y+=5
else:
jumpsate=="running"
wukong=hero[index] wukong=hero[index]
index+=1 index+=1
if index ==5: if index ==5:
......
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