only check for inputs if bound, increases efficiency

This commit is contained in:
Persephone Bubblegum-Holidy 2025-05-26 07:23:50 -07:00
parent 5fb1280e3e
commit 5c78058a9f
2 changed files with 4 additions and 1 deletions

View file

@ -123,7 +123,7 @@ func _ready() -> void:
update_text()
func _process(_delta: float) -> void:
if (binding): return
if (binding || key_binding.keycode == 0): return
if (Input.is_key_pressed(key_binding.keycode)):
if (!held_on_previous_frame):
movement_in.emit(movement_name, in_flow)