mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add get_loops_left() function to Tween
Implements godotengine/godot-proposals#5141. Adds a new get_loops_left() function to Tween, allowing developers to reason about how many times a tweening sequence will repeat and whether to expect finished or loop_finished as the next signal. Co-authored-by: Tomek <kobewi4e@gmail.com>
This commit is contained in:
@@ -131,6 +131,12 @@
|
||||
Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_loops_left" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of remaining loops for this [Tween] (see [method set_loops]). A return value of [code]-1[/code] indicates an infinitely looping [Tween], and a return value of [code]0[/code] indicates that the [Tween] has already finished.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_total_elapsed_time" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
|
||||
Reference in New Issue
Block a user