use bevy::{ prelude::*, window::PresentMode, winit::WinitSettings, }; #[derive(Component)] struct Person; #[derive(Component)] struct Name(String); #[derive(Resource)] struct GreetTimer(Timer); pub struct HelloPlugin; impl Plugin for HelloPlugin { fn build(&self, app: &mut App) { app.insert_resource(GreetTimer(Timer::from_seconds(2.0, TimerMode::Repeating))) .add_startup_system(add_people) .add_system(greet_people); } } fn main() { App::new() .add_plugins(DefaultPlugins.set(WindowPlugin { primary_window: Some(Window { title: "Sky Hero".into(), resolution:(640., 480.).into(), present_mode: PresentMode::AutoVsync, // Tells wasm to resize the window according to the available canvas fit_canvas_to_parent: false, // Tells wasm not to override default event handling, like F5, Ctrl+R etc. prevent_default_event_handling: false, ..default() }), ..default()})) .add_plugin(HelloPlugin) .insert_resource(WinitSettings::desktop_app()) .add_startup_system(setup) .add_system(file_drop) .add_system(button_system) .run(); } #[allow(dead_code)] fn hello_world(time: Res