reformatted player input calls
This commit is contained in:
parent
b7a370c820
commit
fb53954205
21
src/player.c
21
src/player.c
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue