Particles2D: implement texture flip parameters.
(cherry picked from commit 6a2dccaf77
)
This commit is contained in:
parent
c67b08300a
commit
fb2173174d
|
@ -612,6 +612,10 @@ void Particles2D::_notification(int p_what) {
|
||||||
src_rect.pos.y = size.y * (frame/h_frames);
|
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);
|
texture->draw_rect_region(ci,Rect2(Point2(),size),src_rect,color);
|
||||||
//VisualServer::get_singleton()->canvas_item_add_texture_rect(ci,r,texrid,false,color);
|
//VisualServer::get_singleton()->canvas_item_add_texture_rect(ci,r,texrid,false,color);
|
||||||
|
|
Loading…
Reference in a new issue