python中如何判断pygame.Sprite.Group()中包含几个list,要想判断Group中已经把list都移除了该怎么做?
BirdGroup=pygame.Sprite.Group()BirdGroup.add(bird1(bird)forbirdlistinBirdGroup.sprite...
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中是空的? 展开
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个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询