A countdown timer.
Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. [b]Note:[/b] Timers are affected by [member Engine.time_scale], a higher scale means quicker timeouts, and vice versa. [b]Note:[/b] To create a one-shot timer without instantiating a node, use [method SceneTree.create_timer].
https://godotengine.org/asset-library/asset/515
Returns [code]true[/code] if the timer is stopped.
Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec > 0[/code]. This also resets the remaining time to [code]wait_time[/code]. [b]Note:[/b] This method will not resume a paused timer. See [member paused].
Stops the timer.
- If [code]true[/code], the timer will automatically start when entering the scene tree. [b]Note:[/b] This property is automatically set to [code]false[/code] after the timer enters the scene tree and starts.
- If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart.
- If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called.
- Processing mode. See [enum TimerProcessMode].
- The timer's remaining time in seconds. Returns 0 if the timer is inactive. [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [method start].
- The wait time in seconds. [b]Note:[/b] Timers can only emit once per rendered frame at most (or once per physics frame if [member process_mode] is [constant TIMER_PROCESS_PHYSICS]). This means very low wait times (lower than 0.05 seconds) will behave in significantly different ways depending on the rendered framerate. For very low wait times, it is recommended to use a process loop in a script instead of using a Timer node. Timers are affected by [member Engine.time_scale], a higher scale means quicker timeouts, and vice versa.
Emitted when the timer reaches 0.
Update the timer during the physics step at each frame (fixed framerate processing).
Update the timer during the idle time at each frame.