Commit 6c8ea3e8 by BellCodeEditor

auto save

parent b2674b9d
Showing with 8 additions and 0 deletions
...@@ -35,6 +35,9 @@ t = 30 ...@@ -35,6 +35,9 @@ t = 30
road_x = 0 road_x = 0
background_x = 0 background_x = 0
obstacle = Abc(stone,cacti,bush) obstacle = Abc(stone,cacti,bush)
time = 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:
...@@ -73,6 +76,11 @@ while True: ...@@ -73,6 +76,11 @@ while True:
screen.blit(wukong, (150, y)) screen.blit(wukong, (150, y))
if background_x < -1000: if background_x < -1000:
background_x = 0 # 悟空 background_x = 0 # 悟空
time += 1
if time >= 60:
time = 0
num = random.randint(0,50)
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