Commit 509a7a82 by BellCodeEditor

save project

parent 080ee70a
Showing with 6 additions and 0 deletions
...@@ -26,6 +26,8 @@ obstacle = random.choice([bush, stone, cacti]) ...@@ -26,6 +26,8 @@ obstacle = random.choice([bush, stone, cacti])
rect = obstacle.get_rect() rect = obstacle.get_rect()
rect.x = 1000 rect.x = 1000
rect.y = 500 - rect.height rect.y = 500 - rect.height
road_x = 1000
background_x = 1000
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -50,6 +52,10 @@ while True: ...@@ -50,6 +52,10 @@ while True:
else: else:
jumpState = "runing" jumpState = "runing"
t =30 t =30
if road_x <= -1000:
road_x = 0
if background_x <= -1000:
background_x = 0
# 悟空造型 # 悟空造型
wukong = hero[index] wukong = hero[index]
......
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