You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Add tween_subtween method for nesting Tweens
No actual functionality yet Actual subtween functionality implemented Added documentation for Tween.tween_subtween and SubtweenTweener Implemented some additional functions `set_ease`, `set_trans`, and `set_delay` Documentation only for `set_delay` so far, since I have tested it Removed set_ease and set_trans Upon further investigation, the way they are implemented for Tween doesn't appear to work here Fixed indentation in documentation Reset subtween when parent loops Fix return type of `SubtweenTweener.set_delay` Add notes to documentation Apply suggestions from code review Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com> Apply some suggested changes - Remove excessive documentation - Add Tween constructor that takes in SceneTree - Make `SubtweenTweener::subtween` public so that `Tween` doesn't have to be a friend class Remove unneeded friend class SceneTree Remove superfluous documentation describing subtween behavior Apply suggestions from code review Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com> Apply suggestions from code review Co-authored-by: Thaddeus Crews <repiteo@outlook.com> Apply suggestions from code review Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Early return from `tween_subtween` if the subtween is `null`
This commit is contained in:
@@ -1583,11 +1583,17 @@ Ref<SceneTreeTimer> SceneTree::create_timer(double p_delay_sec, bool p_process_a
|
||||
|
||||
Ref<Tween> SceneTree::create_tween() {
|
||||
_THREAD_SAFE_METHOD_
|
||||
Ref<Tween> tween = memnew(Tween(true));
|
||||
Ref<Tween> tween;
|
||||
tween.instantiate(this);
|
||||
tweens.push_back(tween);
|
||||
return tween;
|
||||
}
|
||||
|
||||
bool SceneTree::remove_tween(const Ref<Tween> &p_tween) {
|
||||
_THREAD_SAFE_METHOD_
|
||||
return tweens.erase(p_tween);
|
||||
}
|
||||
|
||||
TypedArray<Tween> SceneTree::get_processed_tweens() {
|
||||
_THREAD_SAFE_METHOD_
|
||||
TypedArray<Tween> ret;
|
||||
|
||||
Reference in New Issue
Block a user