summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorAndreas Haas <liu.gam3@gmail.com>2017-02-10 00:48:38 +0100
committerAndreas Haas <liu.gam3@gmail.com>2017-02-10 00:50:21 +0100
commit6a2dccaf77783dd7b67c5a0590b30fff720be69f (patch)
tree10e86693c660c99cd2dd3856c9c19d56fc817458 /scene/2d
parentb87a232668d9f9f3b32c2fceb60bc5f6ef46df22 (diff)
Particles2D: implement texture flip parameters.
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/particles_2d.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index 1051d3f5ff..020c5942c4 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -607,6 +607,10 @@ void Particles2D::_notification(int p_what) {
src_rect.pos.y = size.y * (frame/h_frames);
}
+ if (flip_h)
+ src_rect.size.x=-src_rect.size.x;
+ if (flip_v)
+ src_rect.size.y=-src_rect.size.y;
texture->draw_rect_region(ci,Rect2(Point2(),size),src_rect,color);
//VisualServer::get_singleton()->canvas_item_add_texture_rect(ci,r,texrid,false,color);