toying around
This commit is contained in:
parent
0e1061609c
commit
693f79de3c
2 changed files with 43 additions and 16 deletions
28
src/main.rs
28
src/main.rs
|
@ -1,22 +1,18 @@
|
|||
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)
|
||||
.insert_resource(ClearColor(Color::rgb(0.0,0.02,0.1)))
|
||||
.insert_resource(WindowDescriptor{
|
||||
title: "PixSpace".to_string(),
|
||||
width: 1280.0,
|
||||
height: 800.0,
|
||||
..Default::default()
|
||||
})
|
||||
.add_plugins(DefaultPlugins)
|
||||
// .add_plugin(BuildScenePlugin)
|
||||
// .add_system(hello_world)
|
||||
// .add_startup_system(add_scene)
|
||||
// .add_system(print_positions)
|
||||
.run();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue