summaryrefslogtreecommitdiff
path: root/scene/animation/animation_blend_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_blend_tree.h')
-rw-r--r--scene/animation/animation_blend_tree.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/scene/animation/animation_blend_tree.h b/scene/animation/animation_blend_tree.h
index 258443a999..e55dfb58ed 100644
--- a/scene/animation/animation_blend_tree.h
+++ b/scene/animation/animation_blend_tree.h
@@ -42,12 +42,12 @@ class AnimationNodeAnimation : public AnimationRootNode {
uint64_t last_version = 0;
bool skip = false;
-protected:
- void _validate_property(PropertyInfo &property) const override;
-
- static void _bind_methods();
-
public:
+ enum PlayMode {
+ PLAY_MODE_FORWARD,
+ PLAY_MODE_BACKWARD
+ };
+
void get_parameter_list(List<PropertyInfo> *r_list) const override;
static Vector<String> (*get_editable_animation_list)();
@@ -58,9 +58,25 @@ public:
void set_animation(const StringName &p_name);
StringName get_animation() const;
+ void set_play_mode(PlayMode p_play_mode);
+ PlayMode get_play_mode() const;
+
+ void set_backward(bool p_backward);
+ bool is_backward() const;
+
AnimationNodeAnimation();
+
+protected:
+ void _validate_property(PropertyInfo &property) const override;
+ static void _bind_methods();
+
+private:
+ PlayMode play_mode = PLAY_MODE_FORWARD;
+ bool backward = false;
};
+VARIANT_ENUM_CAST(AnimationNodeAnimation::PlayMode)
+
class AnimationNodeOneShot : public AnimationNode {
GDCLASS(AnimationNodeOneShot, AnimationNode);