Skip to content

Bullets shouldn't be tied to enemies #89

@lumi-a

Description

@lumi-a

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions