Commit ee4402e5 by BellCodeEditor

save project

parent fd684a86
Showing with 4 additions and 1 deletions
......@@ -51,15 +51,17 @@ while True:
t+=2
else:
jumpstate="running"
if rect <=0-rect.width:
if rect.x <=0-rect.width:
ob=random.choice([stone,apple,cacti])
rect=ob.get_rect()
rect.x=1000
rect.y=500-rect.height
rect.x-=8
# 将背景图画上去
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
screen.blit(hero[n], (150, y))
screen.blit(ob, (rect.x, rect.y))
# 刷新画面
pygame.display.update()
FPS.tick(60)
\ 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