diff options
Diffstat (limited to 'src/input.rs')
| -rw-r--r-- | src/input.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs index 09a0436..30f3834 100644 --- a/src/input.rs +++ b/src/input.rs @@ -23,6 +23,7 @@ pub enum Input { // game controls? Grenade, + Tnt, // placeholder actions Action1, @@ -33,9 +34,9 @@ pub enum Input { Action6, } -const INPUT_VAR_LEN: usize = 16; +const INPUT_VAR_LEN: usize = 17; -const KEYMAP: [(KeyCode, Input); 16] = [ +const KEYMAP: [(KeyCode, Input); INPUT_VAR_LEN] = [ (KeyCode::KeyW, Input::Up), (KeyCode::KeyA, Input::Left), (KeyCode::KeyS, Input::Down), @@ -46,6 +47,7 @@ const KEYMAP: [(KeyCode, Input); 16] = [ (KeyCode::KeyV, Input::ClearEntities), (KeyCode::KeyP, Input::ClearParticles), (KeyCode::KeyG, Input::Grenade), + (KeyCode::KeyT, Input::Tnt), (KeyCode::Digit1, Input::Action1), (KeyCode::Digit2, Input::Action2), (KeyCode::Digit3, Input::Action3), |
