2 releases
0.1.1 | Nov 30, 2022 |
---|---|
0.1.0 | Nov 25, 2022 |
#2536 in Game dev
23KB
bundle_bundle
Extension trait for Bundle with one method bundle
that provides an alternative to tuples for building anonymous bundles.
Supports Bevy 0.9
Usage
Add to your project with:
cargo add bundle_bundle
Now where you used a tuple struct:
commands.spawn((
Text2dBundle::from_section("message", text_style),
Background(Color::NAVY),
MessageMarkerComponent,
));
You can instead use:
use bundle_bundle::BundleBundleExt;
commands.spawn(
Text2dBundle::from_section("message", text_style)
.bundle(BackgroundColor(Color::NAVY))
.bundle(MessageMarkerComponent)
);
Examples
cargo run --example hello_world
Dependencies
~19–34MB
~574K SLoC