One-shot timer.
    public abstract class SceneTreeTimer : Reference

A one-shot timer managed by the scene tree, which emits timeout on completion. See also SceneTree.CreateTimer(float, bool).

As opposed to Timer, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example:

[codeblock]

func some_function():

print(“start”)

yield(get_tree().create_timer(1.0), “timeout”)

print(“end”)

[/codeblock]

Inheritance Chain

Signals

    "timeout" ()

Emitted when the timer reaches 0.

Properties

    public float TimeLeft { get; set; }

The time remaining.

Methods

    public float GetTimeLeft()

Getter for TimeLeft

    public void SetTimeLeft(float time)

Setter for TimeLeft

Tags: