summaryrefslogtreecommitdiff
path: root/scene/resources/animation.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/animation.h')
-rw-r--r--scene/resources/animation.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index 1f2d9b80ab..8b677fe0da 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -58,6 +58,13 @@ public:
INTERPOLATION_CUBIC
};
+ enum UpdateMode {
+ UPDATE_CONTINUOUS,
+ UPDATE_DISCRETE,
+ UPDATE_TRIGGER,
+
+ };
+
private:
struct Track {
@@ -105,10 +112,11 @@ private:
struct ValueTrack : public Track {
- bool continuous;
+ UpdateMode update_mode;
+ bool update_on_seek;
Vector< TKey<Variant> > values;
- ValueTrack() { type=TYPE_VALUE; continuous=true; }
+ ValueTrack() { type=TYPE_VALUE; update_mode=UPDATE_CONTINUOUS; }
};
@@ -163,6 +171,7 @@ private:
float length;
float step;
bool loop;
+ bool loop_interpolation;
// bind helpers
private:
@@ -253,8 +262,9 @@ public:
Variant value_track_interpolate(int p_track, float p_time) const;
void value_track_get_key_indices(int p_track, float p_time, float p_delta,List<int> *p_indices) const;
- void value_track_set_continuous(int p_track, bool p_continuous);
- bool value_track_is_continuous(int p_track) const;
+ void value_track_set_update_mode(int p_track, UpdateMode p_mode);
+ UpdateMode value_track_get_update_mode(int p_track) const;
+
void method_track_get_key_indices(int p_track, float p_time, float p_delta,List<int> *p_indices) const;
Vector<Variant> method_track_get_params(int p_track,int p_key_idx) const;
@@ -265,7 +275,9 @@ public:
float get_length() const;
void set_loop(bool p_enabled);
+ void set_loop_interpolation(bool p_enabled);
bool has_loop() const;
+ bool has_loop_interpolation() const;
void set_step(float p_step);
float get_step() const;
@@ -281,5 +293,8 @@ public:
VARIANT_ENUM_CAST( Animation::TrackType );
VARIANT_ENUM_CAST( Animation::InterpolationType );
+VARIANT_ENUM_CAST( Animation::UpdateMode );
+
+
#endif