add consume method
Co-authored-by: Ivan Yuriev <ivanyr44@gmail.com>
This commit is contained in:
parent
ace775f676
commit
70e0c52d59
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user