Just spawn one CameraUiBundle (not 4) (#1047)

This commit is contained in:
Nathan Stocks 2020-12-12 17:55:20 -07:00 committed by GitHub
parent 9239621ffc
commit fd3706b8de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,8 @@ struct TextChanges;
fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
let font = asset_server.load("fonts/FiraSans-Bold.ttf");
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
commands.spawn(CameraUiBundle::default());
commands.spawn(TextBundle {
style: Style {
align_self: AlignSelf::FlexEnd,
position_type: PositionType::Absolute,
@ -43,7 +44,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
},
..Default::default()
});
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
commands.spawn(TextBundle {
style: Style {
align_self: AlignSelf::FlexEnd,
position_type: PositionType::Absolute,
@ -74,7 +75,6 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
..Default::default()
});
commands
.spawn(CameraUiBundle::default())
.spawn(TextBundle {
style: Style {
align_self: AlignSelf::FlexEnd,
@ -98,7 +98,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
..Default::default()
})
.with(TextChanges);
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
commands.spawn(TextBundle {
style: Style {
align_self: AlignSelf::FlexEnd,
position_type: PositionType::Absolute,