Commit d10bb032 by BellCodeEditor

save project

parent 488cdfdb
Showing with 7 additions and 3 deletions
...@@ -63,7 +63,7 @@ while True: ...@@ -63,7 +63,7 @@ while True:
t =30 t =30
# 悟空造型 # 悟空造型
wukong = hero[index] wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下 if jumpState == "runing": # 跑步状态下
index += 1 index += 1
if index >= 5: if index >= 5:
...@@ -93,8 +93,12 @@ while True: ...@@ -93,8 +93,12 @@ while True:
screen.blit(sprite.image, (sprite.rect.x, sprite.rect.y)) screen.blit(sprite.image, (sprite.rect.x, sprite.rect.y))
if sprite.rect.x <= 0-sprite.rect.width: if sprite.rect.x <= 0-sprite.rect.width:
sprite.kill() sprite.kill()
if pygame.sprite.collide_
if pygame.sprite.collide_ if pygame.sprite.collide_rect(wukong,sprite):
gameover=pygame.image.load('gameover.png')
screen.blit(gameover,(400,200))
gamestate = True
if aa.rect.x <= 0-aa.rect.width: # 障碍物消失 if aa.rect.x <= 0-aa.rect.width: # 障碍物消失
# 创建障碍物对象 # 创建障碍物对象
aa=Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
......
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