Commit 19073974 by BellCodeEditor

save project

parent 8baf804f
Showing with 6 additions and 2 deletions
...@@ -70,8 +70,9 @@ while True: ...@@ -70,8 +70,9 @@ while True:
if jumpState == 'up': if jumpState == 'up':
if JumpSpeed > 0: if JumpSpeed > 0:
y -= JumpSpeed y -= JumpSpeed
wukong.rect.y=y
JumpSpeed-=2 JumpSpeed-=2
else: else:
jumpState = 'down' jumpState = 'down'
...@@ -79,6 +80,7 @@ while True: ...@@ -79,6 +80,7 @@ while True:
if jumpState == 'down': if jumpState == 'down':
if JumpSpeed <= 30: if JumpSpeed <= 30:
y += JumpSpeed y += JumpSpeed
wukong.rect.y=y
JumpSpeed+=2 JumpSpeed+=2
else: else:
...@@ -130,7 +132,9 @@ while True: ...@@ -130,7 +132,9 @@ while True:
prop.rect.x-=8 prop.rect.x-=8
screen.blit(prop.image,(prop.rect.x,prop.rect.y)) screen.blit(prop.image,(prop.rect.x,prop.rect.y))
if pygame.sprite.collide_rect(wukong,prop): if pygame.sprite.collide_rect(wukong,prop):
gamestate= gamestate=False
screen.blit(gameover,(500, 200))
if prop.rect.x <= 0-prop.rect.width: if prop.rect.x <= 0-prop.rect.width:
prop.kill() prop.kill()
......
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