python中如何判断pygame.Sprite.Group()中包含几个list,要想判断Group中已经把list都

python中如何判断pygame.Sprite.Group()中包含几个list,要想判断Group中已经把list都移除了该怎么做?
BirdGroup=pygame.Sprite.Group()
BirdGroup.add(bird1(bird)
for birdlist in BirdGroup.sprites():
screen.blit(birdlist.image,birdlist.rect)
if planeSprite.rect.colliderect(birdlist.rect):
BirdGroup.remove(birdlist)
如何判断BirdGroup中是空的?
会飞_滴猪 1年前 已收到1个回答 举报

你说我是你的谁 幼苗

共回答了21个问题采纳率:85.7% 举报

if len(BirdGroup)==0:
pass

1年前

3
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 1.140 s. - webmaster@yulucn.com