Skip to content

Consider removing Bevy's "foreach" function systems #42

@cart

Description

@cart

From what I can tell, they are incompatible with legion's new lifetimes. Additionally, they add a significant amount of cold compile time (over 20 seconds).

Its a shame because they are so ergonomic:

// foreach system from the ECS Guide
fn score_system(player: Com<Player>, mut score: ComMut<Score>) {
    let scored_a_point = random::<bool>();
    if scored_a_point {
        score.value += 1;
        println!(
            "{} scored a point! Their score is: {}",
            player.name, score.value
        );
    } else {
        println!(
            "{} did not score a point! Their score is: {}",
            player.name, score.value
        );
    }

    // this game isn't very fun is it :)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions