Update spawn_screen function
This commit is contained in:
32
src/lib.rs
32
src/lib.rs
@@ -238,22 +238,18 @@ fn spawn_ui(mut commands: Commands, score: Res<Score>, lives: Res<Lives>) {
|
|||||||
fn start_screen(mut commands: Commands) {
|
fn start_screen(mut commands: Commands) {
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
TitleUI,
|
TitleUI,
|
||||||
TextBundle::from_sections([
|
Node {
|
||||||
TextSection::new(
|
flex_direction: FlexDirection::Column,
|
||||||
"Robert's Bad Asteroids Game",
|
..Default::default()
|
||||||
TextStyle {
|
},
|
||||||
font_size: 50.0,
|
)).with_children(|cmds| {
|
||||||
..default()
|
cmds.spawn((
|
||||||
},
|
Text::new("Robert's Bad Asteroids Game"),
|
||||||
),
|
TextFont::from_font_size(50.0),
|
||||||
TextSection::new(
|
));
|
||||||
"Press space to begin",
|
cmds.spawn((
|
||||||
TextStyle {
|
Text::new("Press space to begin"),
|
||||||
font_size: 40.0,
|
TextFont::from_font_size(40.0),
|
||||||
..default()
|
));
|
||||||
},
|
});
|
||||||
),
|
|
||||||
])
|
|
||||||
.with_text_justify(bevy::text::JustifyText::Center),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user