Commit b003d68f by BellCodeEditor

save project

parent 2742489a
Showing with 13 additions and 2 deletions
...@@ -78,9 +78,19 @@ while True: ...@@ -78,9 +78,19 @@ while True:
# 创建障碍物对象 # 创建障碍物对象
aa=Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
aa.rect.x -= 8 aa.rect.x -= 8
screen.blit(aa.image, (aa.rect.x, aa.rect.y)) screen.blit(aa.image, (aa.rect.x, aa.rect.y))
time += 1
if time >=60:
r =random.randint(0,100)
if>40:
obtacle = Block(bush,cacti,stone)
block_.list.add(obtacel)
time=0
for prop in block_list:
prop.rect.x-=8
screen.bilt(prop.image,(prop.rect.x,prop.rect.y))
if prop.rext.x <=0-prop.rect.width
prop.kill
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) 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