Add CLI
Initially just basic options and seed
This commit is contained in:
parent
946e961633
commit
4476bdfeeb
3 changed files with 128 additions and 2 deletions
|
@ -9,19 +9,22 @@ use bevy::{
|
|||
input::common_conditions::input_pressed,
|
||||
prelude::*,
|
||||
};
|
||||
use clap::Parser;
|
||||
|
||||
use distributed_physics_test::Random;
|
||||
|
||||
const AREA_WIDTH: f32 = 750.;
|
||||
const PLAYER_SIZE: f32 = 30.;
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Parser)]
|
||||
#[command(version, about)]
|
||||
struct AppSettings {
|
||||
#[arg(short, long, default_value = "")]
|
||||
seed: String,
|
||||
}
|
||||
|
||||
fn main() -> AppExit {
|
||||
run_app(AppSettings::default())
|
||||
run_app(AppSettings::parse())
|
||||
}
|
||||
|
||||
fn run_app(settings: AppSettings) -> AppExit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue