summaryrefslogtreecommitdiff
path: root/scene/animation/tween.h
diff options
context:
space:
mode:
authorRăzvan C. Rădulescu <razcore.art@gmail.com>2018-06-26 17:29:08 +0200
committerRăzvan C. Rădulescu <razcore.art@gmail.com>2018-06-26 18:16:57 +0200
commit5c914e2d5b5ac1e488c97089e1bc053585fce9a8 (patch)
treee15a27d213bfec90a81fbfff1171477c30422d84 /scene/animation/tween.h
parentc8617565d84d69b1966878debe61b4c712750780 (diff)
Fix and make Tween node less confusing
I've made the following changes: - make `is_active` the main way of keeping track of tween processing/activity, meaning that `is_active` will now return `false` if all tween actions have finished or if it isn't started or if it was stopped via `set_active(false)` or any other mode - removed is_stopped because is redundand now The above meant that we don't have to keep track of yet another variable `available` since everything is based on `*processing_internal` so I removed it, likewise it's own local `processing` variable was removed, as well as the "double" `_set_process` which it feels more like a hack. What wasn't changed: - `tell()` still returns max value (i.e. `== get_runtime()` when all tweens `finish`) *More testing is needed*. So far I've tested repeat on/off, delay, `is_active()` working corretly, `set_active(true), set_active(false)`, but probably more tests are necessary, all the resets, stops, resume etc.
Diffstat (limited to 'scene/animation/tween.h')
-rw-r--r--scene/animation/tween.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 36094bf294..9997349c64 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -104,8 +104,6 @@ private:
String autoplay;
TweenProcessMode tween_process_mode;
- bool processing;
- bool active;
bool repeat;
float speed_scale;
mutable int pending_update;
@@ -133,7 +131,6 @@ private:
bool _apply_tween_value(InterpolateData &p_data, Variant &value);
void _tween_process(float p_delta);
- void _set_process(bool p_process, bool p_force = false);
void _remove(Object *p_object, StringName p_key, bool first_only);
protected:
@@ -162,7 +159,6 @@ public:
bool reset_all();
bool stop(Object *p_object, StringName p_key);
bool stop_all();
- bool is_stopped() const;
bool resume(Object *p_object, StringName p_key);
bool resume_all();
bool remove(Object *p_object, StringName p_key);