From 6ef71e4b2a7747e71b5d59fa4e699857fb1b00f9 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sat, 18 Mar 2023 12:04:25 -0700 Subject: [PATCH] Hello world stuff --- src/main.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main.rs b/src/main.rs index 7ac5f2f..bc3654d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,34 @@ use bevy::prelude::*; +#[derive(Component)] +struct Person; + + +#[derive(Component)] +struct Name(String); + +fn add_people(mut commands: Commands) { + + commands.spawn((Person, Name("Skero Tlamenai".into()))); + commands.spawn((Person, Name("Wagoyesa Luutunen".into()))); + commands.spawn((Person, Name("Mak'lazi Heyorem".into()))); +} + +fn greetings(query: Query<&Name, With>) { + for name in &query { + println!("Gamarjoba, {}", name.0) + } + +} + fn gamarjoba() { println!("Gamarjoba, munde!"); } fn main() { App::new() + .add_startup_system(add_people) + .add_system(greetings) .add_system(gamarjoba) .run(); }