mirror of
https://github.com/bevyengine/bevy
synced 2024-11-29 08:00:20 +00:00
a880b54508
* Add generic support for `#[derive(SystemParam)]` * Make EventReader a SystemParam
14 lines
323 B
Rust
14 lines
323 B
Rust
use bevy::{input::touch::*, prelude::*};
|
|
|
|
fn main() {
|
|
App::build()
|
|
.add_plugins(DefaultPlugins)
|
|
.add_system(touch_event_system.system())
|
|
.run();
|
|
}
|
|
|
|
fn touch_event_system(mut touch_events: EventReader<TouchInput>) {
|
|
for event in touch_events.iter() {
|
|
println!("{:?}", event);
|
|
}
|
|
}
|