summaryrefslogtreecommitdiff
path: root/scene/animation/tween.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/tween.h')
-rw-r--r--scene/animation/tween.h45
1 files changed, 20 insertions, 25 deletions
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 822fcf0b6f..142c0c65e0 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -79,11 +79,11 @@ private:
};
struct InterpolateData {
- bool active;
- InterpolateType type;
- bool finish;
- bool call_deferred;
- real_t elapsed;
+ bool active = false;
+ InterpolateType type = INTER_CALLBACK;
+ bool finish = false;
+ bool call_deferred = false;
+ real_t elapsed = 0.0;
ObjectID id;
Vector<StringName> key;
StringName concatenated_key;
@@ -92,33 +92,28 @@ private:
Variant final_val;
ObjectID target_id;
Vector<StringName> target_key;
- real_t duration;
- TransitionType trans_type;
- EaseType ease_type;
- real_t delay;
- int args;
+ real_t duration = 0.0;
+ TransitionType trans_type = TransitionType::TRANS_BACK;
+ EaseType ease_type = EaseType::EASE_COUNT;
+ real_t delay = 0.0;
+ int args = 0;
Variant arg[5];
- int uid;
- InterpolateData() {
- active = false;
- finish = false;
- call_deferred = false;
- uid = 0;
- }
+ int uid = 0;
};
String autoplay;
- TweenProcessMode tween_process_mode;
- bool repeat;
- float speed_scale;
- mutable int pending_update;
- int uid;
+ TweenProcessMode tween_process_mode = TWEEN_PROCESS_IDLE;
+ bool repeat = false;
+ float speed_scale = 1.0;
+ mutable int pending_update = 0;
+ int uid = 0;
+ bool was_stopped = false;
List<InterpolateData> interpolates;
struct PendingCommand {
StringName key;
- int args;
+ int args = 0;
Variant arg[10];
};
List<PendingCommand> pending_commands;