diff options
Diffstat (limited to 'scene/2d/particles_2d.h')
-rw-r--r-- | scene/2d/particles_2d.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/scene/2d/particles_2d.h b/scene/2d/particles_2d.h index 6d91fcafc3..4ee0fcf8da 100644 --- a/scene/2d/particles_2d.h +++ b/scene/2d/particles_2d.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -31,6 +31,7 @@ #include "scene/2d/node_2d.h" #include "scene/resources/texture.h" +#include "scene/resources/color_ramp.h" class Particles2D; class ParticleAttractor2D : public Node2D { @@ -125,11 +126,6 @@ private: }; Vector<Particle> particles; - int color_phase_count; - struct ColorPhase { - Color color; - float pos; - } color_phases[MAX_COLOR_PHASES]; struct AttractorCache { @@ -161,6 +157,9 @@ private: Ref<Texture> texture; + //If no color ramp is set then default color is used. Created as simple alternative to color_ramp. + Color default_color; + Ref<ColorRamp> color_ramp; void testee(int a, int b, int c, int d, int e); void _process_particles(float p_delta); @@ -230,6 +229,12 @@ public: void set_texture(const Ref<Texture>& p_texture); Ref<Texture> get_texture() const; + void set_color(const Color& p_color); + Color get_color() const; + + void set_color_ramp(const Ref<ColorRamp>& p_texture); + Ref<ColorRamp> get_color_ramp() const; + void set_emissor_offset(const Point2& p_offset); Point2 get_emissor_offset() const; |