add key binding F7 to restart the game
This commit is contained in:
parent
eb481edc8e
commit
0c31055422
|
@ -32,6 +32,7 @@ Links:
|
|||
- R: Rotate (hold & move mouse)
|
||||
- E: Interact: Talk to people, enter vehicles
|
||||
- Q: Exit vehicle
|
||||
- F7: Restart game
|
||||
- JKULIO: Mouseless camera rotation
|
||||
- Augmented Reality: (toggle with Tab)
|
||||
- Left click: Target objects
|
||||
|
|
|
@ -241,6 +241,7 @@ pub fn handle_input(
|
|||
q_vehicles: Query<(Entity, &Transform), (With<actor::Vehicle>, Without<actor::Player>, Without<Camera>)>,
|
||||
mut ew_conv: EventWriter<chat::StartConversationEvent>,
|
||||
mut ew_vehicle: EventWriter<VehicleEnterExitEvent>,
|
||||
mut ew_playerdies: EventWriter<PlayerDiesEvent>,
|
||||
q_player_drives: Query<Entity, With<PlayerDrivesThis>>,
|
||||
) {
|
||||
if q_camera.is_empty() || player.is_empty() {
|
||||
|
@ -294,6 +295,9 @@ pub fn handle_input(
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if keyboard_input.just_pressed(settings.key_restart) {
|
||||
ew_playerdies.send(PlayerDiesEvent(DamageType::Mental));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_vehicle_enter_exit(
|
||||
|
|
|
@ -105,7 +105,7 @@ impl Default for Settings {
|
|||
key_zoom: MouseButton::Right,
|
||||
key_togglehud: KeyCode::Tab,
|
||||
key_exit: KeyCode::Escape,
|
||||
key_restart: KeyCode::F12,
|
||||
key_restart: KeyCode::F7,
|
||||
key_fullscreen: KeyCode::F11,
|
||||
key_forward: KeyCode::KeyW,
|
||||
key_back: KeyCode::KeyS,
|
||||
|
@ -139,12 +139,12 @@ impl Default for Settings {
|
|||
key_cheat_stop: KeyCode::KeyC,
|
||||
key_cheat_speed: KeyCode::KeyV,
|
||||
key_cheat_speed_backward: KeyCode::KeyB,
|
||||
key_cheat_pizza: KeyCode::F8,
|
||||
key_cheat_farview1: KeyCode::F9,
|
||||
key_cheat_farview2: KeyCode::F10,
|
||||
key_cheat_pizza: KeyCode::F9,
|
||||
key_cheat_farview1: KeyCode::F10,
|
||||
key_cheat_farview2: KeyCode::F12,
|
||||
key_cheat_adrenaline_zero: KeyCode::F5,
|
||||
key_cheat_adrenaline_mid: KeyCode::F6,
|
||||
key_cheat_adrenaline_max: KeyCode::F7,
|
||||
key_cheat_adrenaline_max: KeyCode::F8,
|
||||
key_cheat_die: KeyCode::KeyZ,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue