Commit cadc5705 by BellCodeEditor

save project

parent 4cb6e268
Showing with 6 additions and 2 deletions
...@@ -23,7 +23,7 @@ jumpS = "run" ...@@ -23,7 +23,7 @@ jumpS = "run"
y = 400 y = 400
yy = 30 yy = 30
roadx = 0 roadx = 0
backgroundx = 0
sj = random.choice([stone,cacti,apple]) sj = random.choice([stone,cacti,apple])
rect =sj.get_rect() rect =sj.get_rect()
rect.x=1000 rect.x=1000
...@@ -57,7 +57,7 @@ while True: ...@@ -57,7 +57,7 @@ while True:
rect =sj.get_rect() rect =sj.get_rect()
rect.x = 1000 rect.x = 1000
rect.y = 500-rect.height rect.y = 500-rect.height
screen.blit(background, (0, 0)) screen.blit(background, (backgroundx, 0))
screen.blit(road, (roadx, 500)) screen.blit(road, (roadx, 500))
screen.blit(hero[index], (150, y)) screen.blit(hero[index], (150, y))
screen.blit(sj, (rect.x, rect.y)) screen.blit(sj, (rect.x, rect.y))
...@@ -70,5 +70,8 @@ while True: ...@@ -70,5 +70,8 @@ while True:
if jumpS == "run": if jumpS == "run":
index=(index+1)%5 index=(index+1)%5
roadx -= 8 roadx -= 8
backgroundx -= 2
if roadx == -1000: if roadx == -1000:
roadx = 0 roadx = 0
if backgroundx == -1000:
backgroundx = 0
\ No newline at end of file
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