Eingabe
pub fn my_system(keys: Res<Input<KeyCode>>, btns: Res<Input<MouseButton>>) {
// Keyboard input
if keys.pressed(KeyCode::Space) {
eprintln!("space is being held down");
}
// Mouse buttons
if btns.just_pressed(MouseButton::Left) {
eprintln!("a left click just happened");
}
}
Wide-eyed Walrus