bullet2_index = (bullet2_index + 2) % BULLET2_NUM 這個是什麼意思?幫我看下
if life_num and not paused: # 繪制全屏炸彈補給並檢測是否獲得 if bomb_supply.active: bomb_supply.move() screen.blit(bomb_supply.image, bomb_supply.rect) if pygame.sprite.collide_mask(bomb_supply, me): get_bomb_sound.play() if bomb_num < 3: bomb_num += 1 bomb_supply.active = False # 發射子彈 if not (delay % 10): bullet_sound.play() if is_double_bullet: bullets = bullet2 bullets[bullet2_index].reset((me.rect.centerx - 33, me.rect.centery)) bullets[bullet2_index + 1].reset((me.rect.centerx + 33, me.rect.centery)) bullet2_index = (bullet2_index + 2) % BULLET2_NUM else: bullets = bullet1 bullets[bullet1_index].reset(me.rect.midtop) bullet1_index = (bullet1_index + 1) % BULLET1_NUM