//! This example demonstrates how to use the many available event listeners. Press the number keys //! to trigger events and output logs to the console. use bevy::{input::keyboard::KeyboardInput, prelude::*}; use bevy_eventlistener::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(EventListenerPlugin::>::default()) .add_plugins(EventListenerPlugin::>::default()) .add_plugins(EventListenerPlugin::>::default()) .add_plugins(EventListenerPlugin::>::default()) .add_plugins(EventListenerPlugin::>::default()) .add_plugins(EventListenerPlugin::>::default()) .add_plugins(EventListenerPlugin::>::default()) .add_systems(Startup, setup) .add_systems( Update, ( keyboard_events, some_complex_system.run_if(on_event::()), ), ) .add_event::() .insert_resource(TargetEntity(Entity::PLACEHOLDER)) .run(); } /// A simple system we will call directly in a callback, blocking the schedule from running. fn some_simple_system(time: Res