Commit 0af779ae by BellCodeEditor

save project

parent 9eb8e566
Showing with 4 additions and 4 deletions
...@@ -63,9 +63,9 @@ while True: ...@@ -63,9 +63,9 @@ while True:
index = 0 index = 0
# 将背景图画上去 # 将背景图画上去
#++++++++++++++++++ #++++++++++++++++++
shan_x -= 1 bg_x -= 1
if shan_x <-1000: if bg_x <-1000:
shan_x=0 bg_x=0
screen.blit(background, (bg_x, 0)) # 远处背景 screen.blit(background, (bg_x, 0)) # 远处背景
road_x -=8 road_x -=8
if road_x <= -1000: if road_x <= -1000:
...@@ -74,7 +74,7 @@ while True: ...@@ -74,7 +74,7 @@ while True:
#++++++++++++++++++++++++++= #++++++++++++++++++++++++++=
screen.blit(wukong, (150, y)) # 悟空 screen.blit(wukong, (150, y)) # 悟空
if rect.x <= 0-aa.rect.width: # 障碍物消失 if rect.x <= 0-rect.width: # 障碍物消失
# 创建障碍物对象 # 创建障碍物对象
obstacle = random.choice([bush,cacti,stone]) obstacle = random.choice([bush,cacti,stone])
rect = obstacle.get_rect() rect = obstacle.get_rect()
......
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