fix: PlayerInput only sends signals when not paused
This commit is contained in:
parent
4df9496b87
commit
41597c6fc4
1 changed files with 3 additions and 0 deletions
|
|
@ -58,6 +58,9 @@ void PlayerInput::_notification(int what) {
|
|||
}
|
||||
|
||||
void PlayerInput::unhandled_input(Ref<InputEvent> const &event) {
|
||||
if (get_tree()->is_paused()) {
|
||||
return;
|
||||
}
|
||||
Input *input{ Input::get_singleton() };
|
||||
if (event->is_action("move_left") || event->is_action("move_right") || event->is_action("move_forward") || event->is_action("move_back")) {
|
||||
Vector2 state{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue