mod breakout; use bevy::prelude::*; use bevy::sprite::MaterialMesh2dBundle; pub struct GamarjobaPlugin; impl Plugin for GamarjobaPlugin { fn build(&self, app: &mut App) { app.add_startup_system(add_people) .insert_resource(GreetTimer(Timer::from_seconds(2.0, TimerMode::Repeating))) .add_system(greetings); } } #[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()))); } #[derive(Resource)] struct GreetTimer(Timer); fn greetings(query: Query<&Name, With>, time: Res