Versions
What versions of Godot do you want to use this feature in?
latest
The Feature
Add the ability to wait for a signal to be emitted with specified parameter values. This should probably be done with another method instead of complicating the argument list for wait_for_signal.
Example:
func test_switches_to_idle_state_after_attack():
var player = add_child_autofree(Player.new())
player.attack()
# wait up to 5 seconds for the state machine to change state to idle.
await wait_for_signal_with_parameters(player.state_machine.state_changed, ['idle'], 5)
Versions
What versions of Godot do you want to use this feature in?
latest
The Feature
Add the ability to wait for a signal to be emitted with specified parameter values. This should probably be done with another method instead of complicating the argument list for
wait_for_signal.Example: