Commit 9ec8f0c1 by BellCodeEditor

save project

parent 4f54aa1f
Showing with 6 additions and 8 deletions
......@@ -21,7 +21,7 @@ y=400
jumpState="runing"
t=30
road_x=0
background_x=0
ba_x=0
obstacle=random.choice([apple,stone,cacti])
rect=obstacle.get_rect()
rect.y=500-rect.height
......@@ -53,9 +53,7 @@ while True:
y=400
if jumpState=="runing":
if not y==400:
y=400
y=400
wukong=hero[index]
if jumpState=="runing":
......@@ -64,13 +62,13 @@ while True:
index=0
# 将背景图画上去
screen.blit(background, (background_x, 0))
screen.blit(background, (ba_x, 0))
road_x-=8
if road_x<=-1000:
road_x=0
background_x-=2
if background_x<=-1000:
background_x=0
ba_x-=2
if ba_x<=-1000:
ba_x=0
screen.blit(road, (road_x, 500))
screen.blit(wukong, (150, y))
......
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