Commit f5dfcb42 by BellCodeEditor

save project

parent d492d59d
Showing with 6 additions and 2 deletions
......@@ -21,12 +21,12 @@ t=30
index = 0
y=400
jumpState="running"
stone_x=1000
obstacle=random.choice([apple,stone,cacti])
rect=obstacle.get_rect()
rect.x=1000
rect.y=500-rect.height
road_x=0
while True:
for event in pygame.event.get():
......@@ -63,7 +63,11 @@ while True:
rect.y=500-rect.height
# 将背景图画上去
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))
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