reformatted player input calls

This commit is contained in:
Sara 2023-11-11 12:57:44 +01:00
parent b7a370c820
commit fb53954205

View file

@ -41,22 +41,19 @@ void _internal_player_init_input(Player* self) {
InputEvent_Float
)), (InputDelegateFn)player_input_h);
// JUMP
playerinput_add(self->player_input,
KeyBind_as_InputAxis(keybind_new(SDL_SCANCODE_W)),
(InputDelegateFn)player_input_jump
);
playerinput_add(self->player_input, KeyBind_as_InputAxis(
keybind_new(SDL_SCANCODE_W)
), (InputDelegateFn)player_input_jump);
// CONTROLLER ------------------------------------------------
// WALK
playerinput_add(self->player_input,
ControllerAxis_as_InputAxis(controlleraxis_new(0)),
(InputDelegateFn)player_input_h
);
playerinput_add(self->player_input, ControllerAxis_as_InputAxis(
controlleraxis_new(0)
), (InputDelegateFn)player_input_h);
// JUMP
playerinput_add(self->player_input,
ControllerButton_as_InputAxis(controllerbutton_new(SDL_CONTROLLER_BUTTON_A)),
(InputDelegateFn)player_input_jump
);
playerinput_add(self->player_input, ControllerButton_as_InputAxis(
controllerbutton_new(SDL_CONTROLLER_BUTTON_A)
), (InputDelegateFn)player_input_jump);
}
Player* player_new() {