summaryrefslogtreecommitdiff
path: root/scene/2d/path_2d.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-07-06 11:49:27 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-07-06 11:49:27 -0300
commit3d68949a1cc41b4865618bddde23122f66764ee1 (patch)
tree53a988954a59793223542ff362f70089515dd630 /scene/2d/path_2d.h
parentcd80d442a212a119b4bfce95dce78a08cbc49490 (diff)
2D Animation Improvements
-=-=-=-=-=-=-=-=-=--=-=-= -Ability to set 2D nodes as bones -Abity to set 2D nodes as IK chains -2D IK Solver -Improvements in the UI for adding keyframes (separate loc,rot,scale buttons)
Diffstat (limited to 'scene/2d/path_2d.h')
-rw-r--r--scene/2d/path_2d.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/scene/2d/path_2d.h b/scene/2d/path_2d.h
index f401f9da4c..90f57c8eac 100644
--- a/scene/2d/path_2d.h
+++ b/scene/2d/path_2d.h
@@ -54,4 +54,63 @@ public:
Path2D();
};
+
+
+class PathFollow2D : public Node2D {
+
+ OBJ_TYPE(PathFollow2D,Node2D);
+public:
+
+
+private:
+ Path2D *path;
+ real_t offset;
+ real_t h_offset;
+ real_t v_offset;
+ real_t lookahead;
+ bool cubic;
+ bool loop;
+ bool rotate;
+
+ void _update_transform();
+
+
+protected:
+
+ bool _set(const StringName& p_name, const Variant& p_value);
+ bool _get(const StringName& p_name,Variant &r_ret) const;
+ void _get_property_list( List<PropertyInfo> *p_list) const;
+
+ void _notification(int p_what);
+ static void _bind_methods();
+public:
+
+ void set_offset(float p_offset);
+ float get_offset() const;
+
+ void set_h_offset(float p_h_offset);
+ float get_h_offset() const;
+
+ void set_v_offset(float p_v_offset);
+ float get_v_offset() const;
+
+ void set_unit_offset(float p_unit_offset);
+ float get_unit_offset() const;
+
+ void set_lookahead(float p_lookahead);
+ float get_lookahead() const;
+
+ void set_loop(bool p_loop);
+ bool has_loop() const;
+
+ void set_rotate(bool p_enabled);
+ bool is_rotating() const;
+
+ void set_cubic_interpolation(bool p_enable);
+ bool get_cubic_interpolation() const;
+
+ PathFollow2D();
+};
+
+
#endif // PATH_2D_H