Commit da4e6004 by BellCodeEditor

save project

parent 6b3d349b
Showing with 3 additions and 3 deletions
...@@ -30,8 +30,8 @@ y = 400 ...@@ -30,8 +30,8 @@ y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 30
obstacle =Block(bush, stone, cacti) obstacle =Block(bush, stone, cacti)
background_x=0
road_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:
...@@ -75,7 +75,7 @@ while True: ...@@ -75,7 +75,7 @@ while True:
if obstacle.rect.x<=0-obstacle.rect.width: if obstacle.rect.x<=0-obstacle.rect.width:
obstacle =Block(bush, stone, cacti) obstacle =Block(bush, stone, cacti)
obstacle .x-=8 obstacle.rect.x-=8
screen.blit(obstacle.image, (obstacle.rect.x, obstacle.rect.y)) screen.blit(obstacle.image, (obstacle.rect.x, obstacle.rect.y))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
......
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