Commit 47cea834 by BellCodeEditor

save project

parent 26ec9eb7
Showing with 7 additions and 7 deletions
...@@ -55,7 +55,7 @@ while True: ...@@ -55,7 +55,7 @@ while True:
if jumpState == "up": # 起跳状态 if jumpState == "up": # 起跳状态
if t > 0: if t > 0:
y -= t y -= t
p.image.rect.y=y image.rect.y=y
t -= 2 t -= 2
else: else:
jumpState = "down" jumpState = "down"
...@@ -95,12 +95,12 @@ while True: ...@@ -95,12 +95,12 @@ while True:
if rs>45: if rs>45:
aa=Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
block_list.add(aa) block_list.add(aa)
for prep in block_list: for prop in block_list:
prep.rect.x-=8 prop.rect.x-=8
screen.blit(prep.image, (prep.rect.x, prep.rect.y)) screen.blit(prop.image, (prop.rect.x, prop.rect.y))
if prep.rect.x<=0-prep.rect.width: if prop.rect.x<=0-prop.rect.width:
prep.kill() prop.kill()
if pygame.sprite.collide_rect(wukong,prep): if pygame.sprite.collide_rect(wukong,prop):
o=pygame.image.load("gamemover.png") o=pygame.image.load("gamemover.png")
screen.blit(gameover(500,300)) screen.blit(gameover(500,300))
gs=False gs=False
......
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