add consume method

Co-authored-by: Ivan Yuriev <ivanyr44@gmail.com>
This commit is contained in:
Neckrat 2025-08-21 21:24:43 +03:00
parent ace775f676
commit 70e0c52d59

View File

@ -48,6 +48,13 @@ function controls:cache()
end end
end end
--- marks a control consumed for the current frame
--- the control will no longer be considered active
--- @param key string
function controls:consume(key)
currentKeys[key] = nil
end
--- check if a control is active --- check if a control is active
--- @param key string --- @param key string
function controls:isDown(key) function controls:isDown(key)