feat: updated utils

This commit is contained in:
Sara 2024-04-10 12:45:00 +02:00
parent f0185e64bc
commit 58bf470a89
2 changed files with 5 additions and 9 deletions

View file

@ -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() {

@ -1 +1 @@
Subproject commit f0bddcf074f040e6a02f70a26c58507580669327
Subproject commit 78e6bb2cf18aebf3edd72907f982c811caac9eea