Give the window a title
This commit is contained in:
parent
0c0c306b25
commit
44541e16e1
1 changed files with 10 additions and 2 deletions
12
src/main.rs
12
src/main.rs
|
@ -53,7 +53,15 @@ fn run_app(settings: AppSettings) -> AppExit {
|
|||
|
||||
App::new()
|
||||
.add_plugins((
|
||||
DefaultPlugins,
|
||||
DefaultPlugins.set(WindowPlugin {
|
||||
primary_window: Window {
|
||||
title: "Distributed physics test".into(),
|
||||
fit_canvas_to_parent: true,
|
||||
..default()
|
||||
}
|
||||
.into(),
|
||||
..default()
|
||||
}),
|
||||
PhysicsPlugins::default().with_length_unit(50.0),
|
||||
))
|
||||
.add_systems(Startup, (setup_balls, setup_ui, setup_player, setup_walls))
|
||||
|
@ -89,7 +97,7 @@ fn setup_balls(
|
|||
region: Res<PlayableArea>,
|
||||
) {
|
||||
let mut random = rng();
|
||||
for _ in 0..20 {
|
||||
for _ in 0..50 {
|
||||
let circle = Circle::new(random.random_range(BALL_SIZES));
|
||||
commands.spawn((
|
||||
Ball,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue