Commit b0f532cd by BellCodeEditor

save project

parent 974c21e9
Showing with 2 additions and 2 deletions
...@@ -73,7 +73,7 @@ while True: ...@@ -73,7 +73,7 @@ while True:
screen.blit(background, (bg_x, 0)) screen.blit(background, (bg_x, 0))
# 远处背景 # 远处背景
road_x -= 8 road_x -= 18
if road_x <=-1000: if road_x <=-1000:
road_x = 0 road_x = 0
...@@ -82,7 +82,7 @@ while True: ...@@ -82,7 +82,7 @@ while True:
if obstacle.rect.x <= 0-obstacle.rect.width: # 障碍物消失 if obstacle.rect.x <= 0-obstacle.rect.width: # 障碍物消失
obstacle = Block(bush,stone,cacti) obstacle = Block(bush,stone,cacti)
obstacle.rect.x -= 8 obstacle.rect.x -= 18
screen.blit(obstacle.image, (obstacle.rect.x,obstacle.rect.y)) screen.blit(obstacle.image, (obstacle.rect.x,obstacle.rect.y))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
......
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