Commit 514d0306 by BellCodeEditor

save project

parent b292f681
Showing with 5 additions and 5 deletions
......@@ -20,7 +20,7 @@ hero = [pygame.image.load('hero1.png'),
index = 0
y = 400
t = 30
t = 35
road_x = 0
beijing_x = 0
jump = "running"
......@@ -45,12 +45,12 @@ while True:
else:
jump = "down"
if jump == "down":
if t <= 30:
if t <= 35:
y += t
t += 2
else:
jump = "running"
t = 30
t = 35
wukong = hero[index]
if jump == "running":
index += 1
......@@ -61,7 +61,7 @@ while True:
if beijing_x <= -1000:
beijing_x = 0
screen.blit(background, (beijing_x, 0))
road_x -= 7
road_x -= 8
if road_x <= -1000:
road_x = 0
screen.blit(road, (road_x, 500))
......@@ -72,7 +72,7 @@ while True:
rect.x = 1000
rect.y = 455 - rect.width
else:
rect.x -= 7
rect.x -= 8
screen.blit(obstacle,(rect.x, rect.y))
# 刷新画面
pygame.display.update()
......
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