You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/classes/Timer.xml
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,10 @@
9
9
Without requiring much code, a timer node can be added and configured in the editor. The [signal timeout] signal it emits can also be connected through the Node dock in the editor:
10
10
[codeblock]
11
11
func _on_timer_timeout():
12
-
print("Time to attack!")
12
+
print("Time to attack!")
13
13
[/codeblock]
14
14
[b]Note:[/b] To create a one-shot timer without instantiating a node, use [method SceneTree.create_timer].
15
-
[b]Note:[/b] Timers are affected by [member Engine.time_scale]. The higher the time scale, the sooner timers will end. How often a timer processes may depend on the framerate or [member Engine.physics_ticks_per_second].
15
+
[b]Note:[/b] Timers in Time mode are affected by [member Engine.time_scale]. The higher the time scale, the sooner timers will end. How often a timer processes may depend on the framerate or [member Engine.physics_ticks_per_second].
16
16
</description>
17
17
<tutorials>
18
18
<linktitle="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/2712</link>
The time required for the timer to end, in seconds. This property can also be set every time [method start] is called.
62
-
[b]Note:[/b] Timers can only process once per physics or process frame (depending on the [member process_callback]). An unstable framerate may cause the timer to end inconsistently, which is especially noticeable if the wait time is lower than roughly [code]0.05[/code] seconds. For very short timers, it is recommended to write your own code instead of using a [Timer] node. Timers are also affected by [member Engine.time_scale].
64
+
The time required for the timer to end, in seconds or frames. This property can also be set every time [method start] is called.
65
+
Time mode uses floats while Frame mode only accepts and returns non-fractional numbers.
66
+
[b]Note:[/b] Timers can only process once per physics or process frame (depending on the [member process_callback]). In Time mode, an unstable framerate may cause the timer to end inconsistently, which is especially noticeable if the wait time is lower than roughly [code]0.05[/code] seconds. For very short timers, it is recommended to write your own code instead of using a [Timer] node. Timers are also affected by [member Engine.time_scale].
0 commit comments