diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-14 10:29:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 10:29:50 +0200 |
commit | 195ea41a7ad3dd83d33162d2656e7e383674d3aa (patch) | |
tree | 1b36c889d0811ebd22acbdb1d7253207ac1d712f /scene/animation/tween.h | |
parent | 0d759df0543d48dd0afd8a027a2e6659e38755a2 (diff) | |
parent | e092a132fe8f06f41303f4d3bc47a00e7e78b830 (diff) |
Merge pull request #51237 from KoBeWi/tween_fix()
Various fixes to Tween code
Diffstat (limited to 'scene/animation/tween.h')
-rw-r--r-- | scene/animation/tween.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/animation/tween.h b/scene/animation/tween.h index 947cdb7c2d..953d573539 100644 --- a/scene/animation/tween.h +++ b/scene/animation/tween.h @@ -43,6 +43,7 @@ public: virtual void set_tween(Ref<Tween> p_tween); virtual void start() = 0; virtual bool step(float &r_delta) = 0; + void clear_tween(); protected: static void _bind_methods(); @@ -111,7 +112,7 @@ private: bool started = false; bool running = true; bool dead = false; - bool invalid = true; + bool valid = false; bool default_parallel = false; bool parallel_enabled = false; @@ -128,7 +129,7 @@ public: Ref<IntervalTweener> tween_interval(float p_time); Ref<CallbackTweener> tween_callback(Callable p_callback); Ref<MethodTweener> tween_method(Callable p_callback, float p_from, float p_to, float p_duration); - Ref<Tween> append(Ref<Tweener> p_tweener); + void append(Ref<Tweener> p_tweener); bool custom_step(float p_delta); void stop(); @@ -139,6 +140,7 @@ public: bool is_running(); void set_valid(bool p_valid); bool is_valid(); + void clear(); Ref<Tween> bind_node(Node *p_node); Ref<Tween> set_process_mode(TweenProcessMode p_mode); |