diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-16 15:23:50 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-16 15:23:50 +0800 |
| commit | 7c1ded6fdf9cf897132bd2dd8133064c7b07976c (patch) | |
| tree | e6d6e1301820722918bd605b7eaa2abc520717f4 /logic/controller.lua | |
| parent | dfdb1023f6513014fc0f955142d2667d7bda80c9 (diff) | |
feat(controller): use number key to specifically set next bullet index
Diffstat (limited to 'logic/controller.lua')
| -rw-r--r-- | logic/controller.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/logic/controller.lua b/logic/controller.lua index 44867bf..211a745 100644 --- a/logic/controller.lua +++ b/logic/controller.lua @@ -13,6 +13,11 @@ local function playerChangeNextBullet(key) elseif key == "e" then G.player.nextBullet = G.player.nextBullet +1 end + + local i = tonumber(key) + if i ~= nil then + G.player.nextBullet = i + end end local function playerPressKeysToMoves(dt) |
