2022-05-16 13:53:20 +00:00
|
|
|
//! Demonstrates a startup system (one that runs once when the app starts up).
|
|
|
|
|
2020-07-28 20:43:07 +00:00
|
|
|
use bevy::prelude::*;
|
2020-05-01 20:12:47 +00:00
|
|
|
|
|
|
|
fn main() {
|
2021-07-27 20:21:06 +00:00
|
|
|
App::new()
|
2021-07-27 23:42:36 +00:00
|
|
|
.add_startup_system(startup_system)
|
|
|
|
.add_system(normal_system)
|
2020-05-01 20:12:47 +00:00
|
|
|
.run();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Startup systems are run exactly once when the app starts up.
|
|
|
|
/// They run right before "normal" systems run.
|
|
|
|
fn startup_system() {
|
|
|
|
println!("startup system ran first");
|
|
|
|
}
|
|
|
|
|
|
|
|
fn normal_system() {
|
|
|
|
println!("normal system ran second");
|
|
|
|
}
|