Commit 0ead8ab9 by BellCodeEditor

save project

parent 997d34d0
Showing with 2 additions and 2 deletions
...@@ -32,7 +32,7 @@ road_x=0 ...@@ -32,7 +32,7 @@ road_x=0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 30 t = 30
aa=Block(bush,cacti,stone) obstacle=Block(bush,cacti,stone)
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -78,7 +78,7 @@ while True: ...@@ -78,7 +78,7 @@ while True:
if obstacle.rect.x <= 0-aa.rect.width: # 障碍物消失 if obstacle.rect.x <= 0-aa.rect.width: # 障碍物消失
# 创建障碍物对象 # 创建障碍物对象
obstacle=Block(bush,cacti,stone) obstacle=Block(bush,cacti,stone)
aa.rect.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))
......
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