SceneTreeCreateTimer Method |
Returns a SceneTreeTimer which will SceneTreeTimer.timeout after the given time in seconds elapsed in this SceneTree. If pause_mode_process is set to false, pausing the SceneTree will also pause the timer.
Commonly used to create a one-shot delay timer as in the following example:
func some_function(): print("start") yield(get_tree().create_timer(1.0), "timeout") print("end")
The timer will be automatically freed after its time elapses.
Namespace: Godot
public SceneTreeTimer CreateTimer( float timeSec, bool pauseModeProcess = true )
[Missing <param name="timeSec"/> documentation for "M:Godot.SceneTree.CreateTimer(System.Single,System.Boolean)"]
[Missing <param name="pauseModeProcess"/> documentation for "M:Godot.SceneTree.CreateTimer(System.Single,System.Boolean)"]
[Missing <returns> documentation for "M:Godot.SceneTree.CreateTimer(System.Single,System.Boolean)"]