initial toying around with bevy
This commit is contained in:
commit
0e1061609c
4 changed files with 3295 additions and 0 deletions
22
src/main.rs
Normal file
22
src/main.rs
Normal file
|
@ -0,0 +1,22 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
#[derive(Component)]
|
||||
struct Position { x: f32, y:f32}
|
||||
|
||||
fn hello_world() {
|
||||
println!("Hello World!");
|
||||
}
|
||||
|
||||
|
||||
fn print_position_system(query : Query<&Transform>) {
|
||||
for transform in query.iter() {
|
||||
println!("position {:?}", transform.translation)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_system(hello_world)
|
||||
.run();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue