diff --git a/src/tunnels_player.cpp b/src/tunnels_player.cpp index e750505..4a0fc8c 100644 --- a/src/tunnels_player.cpp +++ b/src/tunnels_player.cpp @@ -23,10 +23,6 @@ namespace godot { void TunnelsPlayer::_bind_methods() { #define CLASSNAME TunnelsPlayer - GDFUNCTION_ARGS(horizontal_move_input, "event", "value"); - GDFUNCTION_ARGS(vertical_move_input, "event", "value"); - GDFUNCTION_ARGS(fire_pressed, "event", "value"); - GDFUNCTION_ARGS(mode_switch_input, "event", "value"); GDPROPERTY_HINTED(camera_rotation_ramp, Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "Curve"); } @@ -107,10 +103,10 @@ void TunnelsPlayer::process_camera_rotation(double delta_time) { } void TunnelsPlayer::setup_player_input(PlayerInput *input) { - input->listen_to(PlayerInput::Listener("move_left", "move_right", this, "horizontal_move_input")); - input->listen_to(PlayerInput::Listener("move_forward", "move_backward", this, "vertical_move_input")); - input->listen_to(PlayerInput::Listener("fire", this, "fire_pressed")); - input->listen_to(PlayerInput::Listener("tactics_mode", this, "mode_switch_input")); + input->listen_to(PlayerInput::Listener("move_left", "move_right", callable_mp(this, &TunnelsPlayer::horizontal_move_input))); + input->listen_to(PlayerInput::Listener("move_forward", "move_backward", callable_mp(this, &TunnelsPlayer::vertical_move_input))); + input->listen_to(PlayerInput::Listener("fire", callable_mp(this, &TunnelsPlayer::fire_pressed))); + input->listen_to(PlayerInput::Listener("tactics_mode", callable_mp(this, &TunnelsPlayer::mode_switch_input))); } Node *TunnelsPlayer::to_node() { diff --git a/src/utils b/src/utils index f0bddcf..78e6bb2 160000 --- a/src/utils +++ b/src/utils @@ -1 +1 @@ -Subproject commit f0bddcf074f040e6a02f70a26c58507580669327 +Subproject commit 78e6bb2cf18aebf3edd72907f982c811caac9eea