Commit 27b7e4f2 by BellCodeEditor

auto save

parent e684427a
Showing with 15 additions and 95 deletions
......@@ -30,9 +30,10 @@ heroLength = len(hero)
state = "runing"
y = 400
t = 30
d = 34
d = 30
f = 30
ob = Block(bush,cacti ,bush)
g = 30
ob = Block(background,cacti ,bush)
road_x = 0
bg_x = 0
while True:
......@@ -87,101 +88,20 @@ while True:
#d
if state == "d" :
if d > 0:
y += d
y -= d
d -= 2
else:
state = "q"
if state == "q" :
if d <= 34:
y -= t
d += 2
f -= 2
else:
state = "f"
if state == "f" :
if f <= 30:
y += f
f += 2
else:
y = 400
state = "d"
if state == "d" :
if d > 0:
y += d
d -= 2
else:
state = "q"
if state == "q" :
if d <= 34:
y -= t
d += 2
f -= 2
else:
state = "f"
if state == "f" :
if f <= 30:
y += f
f += 2
else:
y = 400
state = "d"
if state == "d" :
if d > 0:
y += d
d -= 2
else:
state = "q"
if state == "q" :
if d <= 34:
y -= t
d += 2
f -= 2
else:
state = "f"
if state == "f" :
if f <= 30:
y += f
f += 2
else:
y = 400
state = "d"
if state == "d" :
if d > 0:
y += d
d -= 2
else:
state = "q"
if state == "q" :
if d <= 34:
y -= t
d += 2
f -= 2
else:
state = "f"
if state == "f" :
if f <= 30:
y += f
f += 2
else:
y = 400
state = "d"
if state == "d" :
if d > 0:
y += d
d -= 2
else:
state = "q"
if state == "q" :
if d <= 34:
y -= t
d += 2
f -= 2
if d <= 0:
d += 2
f -= 2
else:
state = "f"
if state == "f" :
if f <= 30:
y += f
f += 2
state = "g"
if state == "g" :
if g <= 30:
y -= g
g += 2
else:
y = 400
state = "runing"
......@@ -191,13 +111,13 @@ while True:
screen.blit(hero[index], (150, y))
bg_x -= 1
if bg_x <= -2000:
if bg_x <= -1000:
bg_x = 0
road_x -= 8
if road_x <= -2000:
if road_x <= -1000:
road_x = 0
if ob.rect.x < 0-ob.rect.width:
ob = Block(bush,cacti ,bush)
ob = Block(background,cacti ,bush)
ob.rect.x -= 8
screen.blit(ob.image,(ob.rect.x , ob.rect.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