Godot version:
3.0.2
OS/device including version:
All
Enhancement Suggestion:
Add an overload of Timer.start() that accepts a float and automatically assigns it to wait_time.
it would basically roll two lines of code into one when desired.
$Timer.set_wait_time(1)
$Timer.start()
#vs
$Timer.start(1)
Steps to reproduce:
Minimal reproduction project:
Sadly Godot doesn't support method overloading. We could add a new method for this though.
Or there could be a default parameter for start.. For example
$Timer.start() # default is -1 and this constant means the user should define it in set_wait_time
$Timer.start(-1) # same as above
$Timer.start(1) # start with custom wait time
Maybe I am using the wrong term, but Godot claims it supports this type of "overloading" for AnimatedSprite.
void play( String anim="" )
Play the animation set in parameter. If no parameter is provided, the current animation is played.
Chaosus's method seems doable. I can get on this if it has to be done.
Here is how it it done in AnimationPlayer.cpp
void AnimatedSprite::play(const StringName &p_animation) {
if (p_animation)
set_animation(p_animation);
_set_playing(true);
}
Most helpful comment
Or there could be a default parameter for start.. For example