Commit 75985f81 by BellCodeEditor

auto save

parent 38452e93
Showing with 4 additions and 3 deletions
......@@ -60,12 +60,12 @@ while True:
screen.blit(road, (0, 500))
screen.blit(wukong, (150, y))
# 刷新画面
if rect.x <= 0-rect.width:
obstacle = choice([bush,stone,cacti])
if rect.x < 0-rect.width:
obstacle = random.choice([bush,stone,cacti])
rect=obstacle.get_rect()
rect.x=1000
rect.y=500-rect.height
rect.x=8
rect.x-=8
screen.blit(obstacle,(rect.x,rect.y))
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
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