summaryrefslogtreecommitdiff
path: root/scene/2d/particles_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/particles_2d.cpp')
-rw-r--r--scene/2d/particles_2d.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index b91d9b835c..27d0d07c0f 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -568,8 +568,8 @@ void Particles2D::_notification(int p_what) {
if (total_frames > 1) {
int frame = Math::fast_ftoi(Math::floor(p.frame * total_frames)) % total_frames;
- src_rect.pos.x = size.x * (frame % h_frames);
- src_rect.pos.y = size.y * (frame / h_frames);
+ src_rect.position.x = size.x * (frame % h_frames);
+ src_rect.position.y = size.y * (frame / h_frames);
}
Rect2 dst_rect(Point2(), size);
if (flip_h)
@@ -774,12 +774,12 @@ Color Particles2D::get_color() const {
return default_color;
}
-void Particles2D::set_color_ramp(const Ref<ColorRamp> &p_color_ramp) {
+void Particles2D::set_color_ramp(const Ref<Gradient> &p_color_ramp) {
color_ramp = p_color_ramp;
}
-Ref<ColorRamp> Particles2D::get_color_ramp() const {
+Ref<Gradient> Particles2D::get_color_ramp() const {
return color_ramp;
}
@@ -810,7 +810,7 @@ void Particles2D::set_color_phases(int p_phases) {
//Create color ramp if we have 2 or more phases.
//Otherwise first phase phase will be assigned to default color.
if (p_phases > 1 && color_ramp.is_null()) {
- color_ramp = Ref<ColorRamp>(memnew(ColorRamp()));
+ color_ramp = Ref<Gradient>(memnew(Gradient()));
}
if (color_ramp.is_valid()) {
color_ramp->get_points().resize(p_phases);