diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-26 16:22:20 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-26 16:22:20 -0300 |
commit | 282da142aea365680acd80c12916d8e46dd2f5e8 (patch) | |
tree | 0e77c1b9c7d370412f2b7a7308dcc3259c73bc29 /scene/2d/parallax_layer.h | |
parent | 33f1204dc4e919660bd923f366897349a9f9fdbb (diff) | |
download | redot-engine-282da142aea365680acd80c12916d8e46dd2f5e8.tar.gz |
Added an option to ParallaxLayer to add an extra scroll offset, helps if you want to make clouds to move by themselves and animate that, for example.
Diffstat (limited to 'scene/2d/parallax_layer.h')
-rw-r--r-- | scene/2d/parallax_layer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/parallax_layer.h b/scene/2d/parallax_layer.h index c2d345da47..6b1d73ea66 100644 --- a/scene/2d/parallax_layer.h +++ b/scene/2d/parallax_layer.h @@ -38,6 +38,7 @@ class ParallaxLayer : public Node2D { Point2 orig_offset; Point2 orig_scale; Size2 motion_scale; + Vector2 motion_offset; Vector2 mirroring; void _update_mirroring(); @@ -48,6 +49,9 @@ protected: public: + void set_motion_offset(const Size2& p_scale); + Size2 get_motion_offset() const; + void set_motion_scale(const Size2& p_scale); Size2 get_motion_scale() const; |