summaryrefslogtreecommitdiff
path: root/scene/2d/cpu_particles_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/cpu_particles_2d.h')
-rw-r--r--scene/2d/cpu_particles_2d.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index 6c83abb311..da668664b9 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -35,10 +35,6 @@
#include "scene/2d/node_2d.h"
#include "scene/resources/texture.h"
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
class CPUParticles2D : public Node2D {
private:
GDCLASS(CPUParticles2D, Node2D);
@@ -96,6 +92,7 @@ private:
float hue_rot_rand;
float anim_offset_rand;
float time;
+ float lifetime;
Color base_color;
uint32_t seed;
@@ -139,6 +136,7 @@ private:
float pre_process_time;
float explosiveness_ratio;
float randomness_ratio;
+ float lifetime_randomness;
float speed_scale;
bool local_coords;
int fixed_fps;
@@ -153,6 +151,7 @@ private:
////////
+ Vector2 direction;
float spread;
float flatness;
@@ -199,6 +198,7 @@ public:
void set_pre_process_time(float p_time);
void set_explosiveness_ratio(float p_ratio);
void set_randomness_ratio(float p_ratio);
+ void set_lifetime_randomness(float p_random);
void set_visibility_aabb(const Rect2 &p_aabb);
void set_use_local_coordinates(bool p_enable);
void set_speed_scale(float p_scale);
@@ -210,6 +210,7 @@ public:
float get_pre_process_time() const;
float get_explosiveness_ratio() const;
float get_randomness_ratio() const;
+ float get_lifetime_randomness() const;
Rect2 get_visibility_aabb() const;
bool get_use_local_coordinates() const;
float get_speed_scale() const;
@@ -234,6 +235,9 @@ public:
///////////////////
+ void set_direction(Vector2 p_direction);
+ Vector2 get_direction() const;
+
void set_spread(float p_spread);
float get_spread() const;
@@ -252,7 +256,7 @@ public:
void set_color(const Color &p_color);
Color get_color() const;
- void set_color_ramp(const Ref<Gradient> &p_texture);
+ void set_color_ramp(const Ref<Gradient> &p_ramp);
Ref<Gradient> get_color_ramp() const;
void set_particle_flag(Flags p_flag, bool p_enable);