Currently, each enemy keeps a .projectile list of its projectiles. As a consequence, destroying an enemy also removes their bullets from the universe. We should instead keep the projectiles in the universe, something like universe._player_projectiles and universe._enemy_projectiles.
Maybe it makes sense to keep separate lists for each projectile-type so that we don't have to call isinstance, but I'm not sure about that yet.
The in-universe projectile-lists also allow for chunking together projectiles, which means faster intersection-checks.
Currently, each enemy keeps a
.projectilelist of its projectiles. As a consequence, destroying an enemy also removes their bullets from the universe. We should instead keep the projectiles in the universe, something likeuniverse._player_projectilesanduniverse._enemy_projectiles.Maybe it makes sense to keep separate lists for each projectile-type so that we don't have to call
isinstance, but I'm not sure about that yet.The in-universe projectile-lists also allow for chunking together projectiles, which means faster intersection-checks.