Compare commits

..

No commits in common. "6705870f8109705119d0a2a0beda7cdd55259cc9" and "11dc9771cc97de3ee731c15d46e0584a25bf6581" have entirely different histories.

3 changed files with 1 additions and 25 deletions

View File

@ -1,2 +0,0 @@
pub struct Name(pub String);
pub struct Player;

View File

@ -1,12 +1,5 @@
mod components;
mod systems;
use bevy::prelude::*; use bevy::prelude::*;
use systems::*;
fn main() { fn main() {
App::build() App::build().run();
.add_startup_system(add_player.system())
.add_system(greet_player.system())
.run();
} }

View File

@ -1,15 +0,0 @@
use crate::components::{Name, Player};
use bevy::prelude::*;
pub fn add_player(mut commands: Commands) {
commands
.spawn()
.insert(Player)
.insert(Name("Player 1".to_string()));
}
pub fn greet_player(query: Query<&Name, With<Player>>) {
for name in query.iter() {
println!("Hello, {}!", name.0);
}
}