diff options
author | Malcolm Anderson <malcolminyo@gmail.com> | 2024-10-30 21:40:06 -0700 |
---|---|---|
committer | Malcolm Anderson <malcolminyo@gmail.com> | 2024-11-11 11:43:45 -0800 |
commit | 47be06b6ea432c3c1c31d0c4c623a8a544c8afef (patch) | |
tree | 5c7782357757e878923bf2fc7f314392b06ec07e /doc/classes | |
parent | 36e6207bb48fafd43b98a458d0c461ad982b4e68 (diff) | |
download | redot-engine-47be06b6ea432c3c1c31d0c4c623a8a544c8afef.tar.gz |
Update `Tween.set_ease` and `Tween.set_trans` to reflect that they only apply to later `Tweener`s
Update doc/classes/Tween.xml
Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
Update doc/classes/Tween.xml
Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
Fix whitespace issue
Remove an unnecessary linebreak
Update doc/classes/Tween.xml
Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
Fixed `set_trans` wording to match `set_ease` and removed static typing from examples
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Tween.xml | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 86a8130acc..6fe8a6bf18 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -218,8 +218,14 @@ <return type="Tween" /> <param index="0" name="ease" type="int" enum="Tween.EaseType" /> <description> - Sets the default ease type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween]. - If not specified, the default value is [constant EASE_IN_OUT]. + Sets the default ease type for [PropertyTweener]s and [MethodTweener]s appended after this method. + Before this method is called, the default ease type is [constant EASE_IN_OUT]. + [codeblock] + var tween = create_tween() + tween.tween_property(self, "position", Vector2(300, 0), 0.5) # Uses EASE_IN_OUT. + tween.set_ease(Tween.EASE_IN) + tween.tween_property(self, "rotation_degrees", 45.0, 0.5) # Uses EASE_IN. + [/codeblock] </description> </method> <method name="set_loops"> @@ -271,8 +277,14 @@ <return type="Tween" /> <param index="0" name="trans" type="int" enum="Tween.TransitionType" /> <description> - Sets the default transition type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween]. - If not specified, the default value is [constant TRANS_LINEAR]. + Sets the default transition type for [PropertyTweener]s and [MethodTweener]s appended after this method. + Before this method is called, the default transition type is [constant TRANS_LINEAR]. + [codeblock] + var tween = create_tween() + tween.tween_property(self, "position", Vector2(300, 0), 0.5) # Uses TRANS_LINEAR. + tween.set_trans(Tween.TRANS_SINE) + tween.tween_property(self, "rotation_degrees", 45.0, 0.5) # Uses TRANS_SINE. + [/codeblock] </description> </method> <method name="stop"> |