Commit 24b3e569 by BellCodeEditor

save project

parent d1ee605e
Showing with 2 additions and 2 deletions
......@@ -5,7 +5,7 @@ import random
pygame.init() # 初始化
time = 0
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
......@@ -69,7 +69,7 @@ while True:
screen.blit(road, (road_x, 500)) # 路
screen.blit(wukong, (150, y)) # 悟空
if rect.x <= 0-rect.width: # 障碍物消失
if rect.x <= random.randint(-1000,0)-rect.width: # 障碍物消失
# 创建障碍物对象
obstacle = random.choice([bush,stone,cacti])
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