Commit 6c8ea3e8 by BellCodeEditor

auto save

parent b2674b9d
Showing with 8 additions and 0 deletions
......@@ -35,6 +35,9 @@ t = 30
road_x = 0
background_x = 0
obstacle = Abc(stone,cacti,bush)
time = 0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -74,6 +77,11 @@ while True:
if background_x < -1000:
background_x = 0 # 悟空
time += 1
if time >= 60:
time = 0
num = random.randint(0,50)
if road_x <-1000:
road_x = 0
if obstacle.rect.x <= 0-obstacle.rect.width: # 障碍物消失
......
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