diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2026-08-24 20:15:21 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2026-08-24 20:15:21 -0700 |
| commit | e28f8b4ef5c0744912afd49d8d1ba9a94e144613 (patch) | |
| tree | a38fe431647834ea21ddd03984e41e5d00c32d50 /src/input.rs | |
| parent | 3bae37a2d439804aee543473ef9b44f18692a67f (diff) | |
fixes for small entities
Diffstat (limited to 'src/input.rs')
| -rw-r--r-- | src/input.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs index dd49cd0..7fe6c79 100644 --- a/src/input.rs +++ b/src/input.rs @@ -21,6 +21,9 @@ pub enum Input { ClearEntities, ClearParticles, + // game controls? + Grenade, + // placeholder actions Action1, Action2, @@ -30,9 +33,9 @@ pub enum Input { Action6, } -const INPUT_VAR_LEN: usize = 17; +const INPUT_VAR_LEN: usize = 16; -const KEYMAP: [(KeyCode, Input); 15] = [ +const KEYMAP: [(KeyCode, Input); 16] = [ (KeyCode::KeyW, Input::Up), (KeyCode::KeyA, Input::Left), (KeyCode::KeyS, Input::Down), @@ -42,6 +45,7 @@ const KEYMAP: [(KeyCode, Input); 15] = [ (KeyCode::KeyC, Input::ClearGrid), (KeyCode::KeyV, Input::ClearEntities), (KeyCode::KeyP, Input::ClearParticles), + (KeyCode::KeyG, Input::Grenade), (KeyCode::Digit1, Input::Action1), (KeyCode::Digit2, Input::Action2), (KeyCode::Digit3, Input::Action3), |
