diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-02-12 23:25:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-12 23:25:34 +0100 |
commit | 73cedc3901a86f9b4a9b4caecff9019fdd497296 (patch) | |
tree | 8ee7f28282a6ab9b6bdcd381d628220ea92f2942 /scene | |
parent | 00b093d24da4f354b4badd15fb4baa9f01b60fd1 (diff) | |
parent | 6a2dccaf77783dd7b67c5a0590b30fff720be69f (diff) |
Merge pull request #7775 from Hinsbart/particles_flip
Particles2D: implement texture flip parameters.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/particles_2d.cpp | 4 |
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); |