Commit 4db8496c by BellCodeEditor

auto save

parent 241d8e7e
Showing with 8 additions and 3 deletions
...@@ -50,18 +50,23 @@ while True: ...@@ -50,18 +50,23 @@ while True:
index += 1 index += 1
if index >= 5: if index >= 5:
index = 0 index = 0
wukong = hero[index] wukong = hero[index]
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
road_x -= 8
if road.x <= -1000:
road.x = 0
screen.blit(road, (road.x, 500))
screen.blit(wukong, (150, y)) screen.blit(wukong, (150, y))
if rect.x < 0-rect.width: if rect.x < 0-rect.width:
oustacle = random.choice([stone,cacti,apple]) oustacle = random.choice([stone,cacti,apple])
rect = oustacle.get_rect() rect = oustacle.get_rect()
rect.x = 1000 rect.x = 1000
rect.y = 500-rect.height rect.y = 500-rect.height
rect.x-=8 rect.x-=8
......
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