#No window

4 messages · Page 1 of 1 (latest)

oblique karma
#

ok i re did the code from learn, its the same outcome

#
use bevy::prelude::*;


#[derive(Component)]
struct Person;

#[derive(Component)]
struct Name(String);

fn main() {
    App::new()
    .add_plugins(DefaultPlugins)
    .add_systems(Startup, add_people)
    .add_systems(Update, (hello_world, (update_people, greet_people).chain()))
    .run();
}
fn hello_world() {
    println!("hello world!");
}

fn add_people(mut commands: Commands) {
    commands.spawn((Person, Name("Elaina Proctor".to_string())));
    commands.spawn((Person, Name("Renzo Hume".to_string())));
    commands.spawn((Person, Name("Zayna Nieves".to_string())));
}

fn greet_people(query: Query<&Name, With<Person>>) {
    for name in &query {
        println!("hello {}!", name.0);
    }
}

fn update_people(mut query: Query<&mut Name, With<Person>>) {
    for mut name in &mut query {
        if name.0 == "Elaina Proctor" {
            name.0 = "Elaina Hume".to_string();
            break; // We don't need to change any other names.
        }
    }
}
#

should i try this on jetbrains?

oblique karma
#

Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.