tinkering around with bevy
This commit is contained in:
parent
52bb4d43df
commit
c33335fc50
5 changed files with 450 additions and 492 deletions
12
src/scene.rs
12
src/scene.rs
|
@ -21,11 +21,19 @@ struct Position { x: f32, y: f32 }
|
|||
fn build_scene(mut commands: Commands) {
|
||||
commands.spawn()
|
||||
.insert(Person)
|
||||
.insert(Position{ x: 10.0, y: 10.0 });
|
||||
.insert(Position { x: 10.0, y: 10.0 } );
|
||||
|
||||
// camera
|
||||
// commands.spawn_bundle(OffAxisProjection {
|
||||
// transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
|
||||
// ..default()
|
||||
// });
|
||||
}
|
||||
|
||||
fn print_positions(query : Query<&Position>) {
|
||||
for position in query.iter() {
|
||||
println!("position {:?} {:?}", position.x, position.y)
|
||||
|
||||
// println!("position {:?} {:?}", position.x, position.y)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue