Commit 639df8fc by BellCodeEditor

save project

parent 95c852c0
Showing with 11 additions and 4 deletions
......@@ -29,6 +29,8 @@ a=random.choice([apple,cacti,stone])
rect=a.get_rect()
rect.x=1000
rect.y=500-rect.height
roadd=road.get_rect()
bd=background.get_rect()
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -65,11 +67,16 @@ while True:
index = 0
# 将背景图画上去
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
roadd.x-=8
if roadd.x<=-1000:
roadd.x=0
bd.x-=2
if bd.x<=-1000:
bd.x=0
screen.blit(background, (bd.x, 0))
screen.blit(road, (roadd.x, 500))
screen.blit(wukong, (150, y))
rect.x -= 5
rect.x -= 8
if rect.x>0-rect.width:
screen.blit(a,(rect.x,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