mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
fix showcase script
This commit is contained in:
parent
7b79b3de8d
commit
fd97bb7bc7
2 changed files with 14 additions and 13 deletions
|
@ -17,11 +17,15 @@ fn main() {
|
|||
|
||||
// this app loops forever at 60 fps
|
||||
App::build()
|
||||
.add_plugin(ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(1.0 / 60.0)))
|
||||
.add_system(hello_world_system.system())
|
||||
.add_plugin(ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(
|
||||
1.0 / 60.0,
|
||||
)))
|
||||
.add_system(some_other_system.system())
|
||||
.run();
|
||||
}
|
||||
|
||||
fn hello_world_system() {
|
||||
println!("hello world");
|
||||
}
|
||||
|
||||
fn some_other_system() {}
|
||||
|
|
|
@ -6,16 +6,13 @@ run_example() {
|
|||
timeout "$duration" cargo run --example $1
|
||||
}
|
||||
|
||||
for entry in examples/*
|
||||
example_list="$(cargo build --example 2>&1)"
|
||||
example_list=${example_list//$'\n'/}
|
||||
example_list="${example_list#error\: \"--example\" takes one argument.Available examples\: }"
|
||||
|
||||
echo $example_list
|
||||
for example in $example_list
|
||||
do
|
||||
IFS='/'
|
||||
read -ra ADDR <<< $entry
|
||||
IFS=' '
|
||||
example_file="${ADDR[1]}"
|
||||
if [ ${example_file: -2} == "rs" ]
|
||||
then
|
||||
example="${example_file::-3}"
|
||||
echo "Running example: $example"
|
||||
run_example $example
|
||||
fi
|
||||
echo "Running example: $example"
|
||||
run_example $example
|
||||
done
|
Loading…
Reference in a new issue