mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
aefe1f0739
Co-authored-by: Mike <mike.hsu@gmail.com>
16 lines
352 B
Rust
16 lines
352 B
Rust
//! Prints out all touch inputs.
|
|
|
|
use bevy::{input::touch::*, prelude::*};
|
|
|
|
fn main() {
|
|
App::new()
|
|
.add_plugins(DefaultPlugins)
|
|
.add_systems(Update, touch_event_system)
|
|
.run();
|
|
}
|
|
|
|
fn touch_event_system(mut touch_events: EventReader<TouchInput>) {
|
|
for event in touch_events.iter() {
|
|
info!("{:?}", event);
|
|
}
|
|
}
|