diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-17 12:01:17 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-17 12:01:17 +0800 |
| commit | db648db83a9e88a185a1a1efc0312815916d8d09 (patch) | |
| tree | 0ea85f689fdb1afb32ecffa5e3f2c2a956235871 /logic/controller.lua | |
| parent | 59fe8bcb4fa355f30d1981908353c2730fd157ed (diff) | |
feat(controller): use mouse wheel to quickly select next bullet
Diffstat (limited to 'logic/controller.lua')
| -rw-r--r-- | logic/controller.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/logic/controller.lua b/logic/controller.lua index 302d764..dc4ec40 100644 --- a/logic/controller.lua +++ b/logic/controller.lua @@ -107,4 +107,12 @@ function controller.mousereleased(x, y, button) end end +function controller.wheelmoved(x, y) + if y > 0 then + playerChangeNextBullet("q") + elseif y < 0 then + playerChangeNextBullet("e") + end +end + return controller |
