Commit 3ab37d27 by BellCodeEditor

auto save

parent 9c6f2126
Showing with 2 additions and 2 deletions
...@@ -14,7 +14,7 @@ class Block(pygame.sprite.Sprite): # 障碍物精灵类 ...@@ -14,7 +14,7 @@ class Block(pygame.sprite.Sprite): # 障碍物精灵类
# 障碍物绘制坐标 # 障碍物绘制坐标
self.rect.x = 1000 self.rect.x = 1000
self.rect.y = 500 - self.rect.height self.rect.y = 500 - self.rect.height
self.score=1 self.score=10
class Player(pygame.sprite.Sprite): # 悟空 class Player(pygame.sprite.Sprite): # 悟空
def __init__(self, image): def __init__(self, image):
...@@ -111,7 +111,7 @@ while True: ...@@ -111,7 +111,7 @@ while True:
time = 0 time = 0
num = random.randint(0,50) num = random.randint(0,50)
if num > 20: if num > 20:
obstacle = Block(bush,cacti,stone) obstacle = Block(bush,cacti,stone)
block_list.add(obstacle) block_list.add(obstacle)
if score>old_score: if score>old_score:
score_music.play() score_music.play()
......
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