Commit bfd2ae92 by BellCodeEditor

auto save

parent 62ce6c6d
Showing with 5 additions and 2 deletions
......@@ -107,8 +107,11 @@ while True:
if num > 20:
obstacle = Block(bush,cacti,stone)
block_list.add(obstacle)
screen pygame(super)
for sprite in block_list: # 遍历、展示障碍物精灵
if sprite.rect.x+sprite.rect.x.width<=wukong.rect.x:
score+=sprite.score
screen.score=0
print(score)
# 遍历、展示障碍物精灵
sprite.rect.x -= 8
screen.blit(sprite.image, (sprite.rect.x, sprite.rect.y))
if sprite.rect.x <= 0-sprite.rect.width:
......
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