Pyxus / fray

Fray – Godot Combat Framework
https://fray.pyxus.dev
MIT License
249 stars 11 forks source link

FrayInput: is_just_released function uses input_state.ispressed signal instead of input_state.is_pressed #88

Open Lukaswbrr opened 6 months ago

Lukaswbrr commented 6 months ago

In the else statement, input_state uses ispressed instead of is_pressed, causing a error

func is_just_released(input: StringName, device: int = DEVICE_KBM_JOY1) -> bool:
    match _get_input_state(input, device):
        var input_state:
            if Engine.is_in_physics_frame():
                return (
                    not input_state.is_pressed
                    and input_state.physics_frame == Engine.get_physics_frames()
                )
            else:
                return (
                    not input_state.ispressed
                    and input_state.process_frame == Engine.get_process_frames()
                )
        null:
            return false