Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/examples/input/touch_input_events.rs
6595 views
1
//! Prints out all touch inputs.
2
3
use bevy::{input::touch::*, prelude::*};
4
5
fn main() {
6
App::new()
7
.add_plugins(DefaultPlugins)
8
.add_systems(Update, touch_event_system)
9
.run();
10
}
11
12
fn touch_event_system(mut touch_events: EventReader<TouchInput>) {
13
for event in touch_events.read() {
14
info!("{:?}", event);
15
}
16
}
17
18