Commit 8fdb4c36 by BellCodeEditor

auto save

parent 8b32eb80
Showing with 4 additions and 4 deletions
...@@ -18,7 +18,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -18,7 +18,7 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'), pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'), pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')] pygame.image.load('hero5.png')]
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 30
...@@ -26,8 +26,8 @@ obstacle = random.choice([bush, stone, cacti]) ...@@ -26,8 +26,8 @@ obstacle = random.choice([bush, stone, cacti])
rect = obstacle.get_rect() rect = obstacle.get_rect()
rect.x = 1000 rect.x = 1000
rect.y = 500 - rect.height rect.y = 500 - rect.height
road_x=0 road_x = 0
bj_x=0 bj_x = 0
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -61,7 +61,7 @@ while True: ...@@ -61,7 +61,7 @@ while True:
# 将背景图画上去 # 将背景图画上去
if bj_x<=-1000: if bj_x<=-1000:
bj_x=0 bj_x=0
bj_x -=2 bj_x -=2
screen.blit(background, (bj_x, 0)) # 远处背景 screen.blit(background, (bj_x, 0)) # 远处背景
if road_x <= -1000: if road_x <= -1000:
road_x=0 road_x=0
......
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