Commit 6696b086 by BellCodeEditor

save project

parent 2dd57907
Showing with 3 additions and 1 deletions
...@@ -76,7 +76,7 @@ while True: ...@@ -76,7 +76,7 @@ while True:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jumpState = "up" jumpState = "up"
speed = 8 + speed//3 speed = 8 + 10 * (speed//3)
# 悟空造型 # 悟空造型
wukong = Player(hero[index]) wukong = Player(hero[index])
...@@ -131,6 +131,8 @@ while True: ...@@ -131,6 +131,8 @@ while True:
gameover = pygame.image.load('gameover.png') # 游戏结束 gameover = pygame.image.load('gameover.png') # 游戏结束
screen.blit(gameover, (400, 200)) screen.blit(gameover, (400, 200))
gamestate = False gamestate = False
else: else:
if sprite.rect.x + sprite.rect.width < wukong.rect.x: if sprite.rect.x + sprite.rect.width < wukong.rect.x:
score += sprite.score #分数 score += sprite.score #分数
......
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