Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tween Sequence can be removed #103

Open
KoBeWi opened this issue Apr 30, 2022 · 0 comments
Open

Tween Sequence can be removed #103

KoBeWi opened this issue Apr 30, 2022 · 0 comments

Comments

@KoBeWi
Copy link
Contributor

KoBeWi commented Apr 30, 2022

After godotengine/godot#60581 was merged, Godot's 3.x branch now officially includes the same Tween system as in Godot 4.0 (as a separate class, SceneTreeTween), which is based on TweenSequence, but superior in many ways. Thus TweenSequence class can now be removed. Also it became incompatible with the newest 3.5, as Tweener class shadows the Tweener in core.

For anyone who wants to continue using TweenSequence in the newest Godot 3.5, they need to rename all Tweener classes to e.g. Tweener2, PropertyTweener2 etc. They are used only internally, so it will be fine.

But I'd suggest everyone to just switch to the new SceneTreeTween. Here's a quick migration guide:
var tween = TweenSequence.new(get_tree()) -> var tween = create_tween()
tween.append(...) -> tween.tween_property()
tween.append_advance(...) -> tween.tween_property(...).as_relative()
tween.append_interval(...) -> tween.tween_interval(...)
tween.append_callback(...) -> tween.tween_callback(...)
tween.append_method(...) -> tween.tween_method(...)
tween.set_loops(x) -> tween.set_loops(x + 1)
tween.set_speed(...) -> tween.set_speed_scale(...)

Aside from these renames, the new SceneTreeTween (and Tween in 4.0) API is compatible with the TweenSequence code. SceneTreeTween will also work much more reliably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant