summaryrefslogtreecommitdiff
path: root/logic/controller.lua
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-16 15:23:50 +0800
committerEltrac <hi@guhub.cn>2025-03-16 15:23:50 +0800
commit7c1ded6fdf9cf897132bd2dd8133064c7b07976c (patch)
treee6d6e1301820722918bd605b7eaa2abc520717f4 /logic/controller.lua
parentdfdb1023f6513014fc0f955142d2667d7bda80c9 (diff)
feat(controller): use number key to specifically set next bullet index
Diffstat (limited to 'logic/controller.lua')
-rw-r--r--logic/controller.lua5
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)