diff options
Diffstat (limited to 'src/render/particleejectorscript.h')
-rw-r--r-- | src/render/particleejectorscript.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/render/particleejectorscript.h b/src/render/particleejectorscript.h index e7c135f..731dbe2 100644 --- a/src/render/particleejectorscript.h +++ b/src/render/particleejectorscript.h @@ -9,6 +9,7 @@ #include "math/axis.h" #include "math/color.h" +#include "math/vector2f.h" #include "math/vector3f.h" #include "model/model.h" @@ -159,11 +160,11 @@ public: } /** - * @brief speed of ejected particles, in gameunits per second + * @brief minimum and maximum speed of ejected particles, in gameunits per second * */ - inline const float speed() const + inline const math::Vector2f & speed_vec() const { - return script_speed; + return script_speed_vec; } /** @@ -210,6 +211,14 @@ public: } /** + * @brief return a reference to the speed vector + * */ + inline math::Vector2f &get_speed_vec() + { + return script_speed_vec; + } + + /** * @brief return a reference to particle color * */ inline math::Color &get_color() @@ -236,9 +245,9 @@ public: /** * @brief set the speed of ejected particles, in gameunits per second * */ - inline void set_speed(const float speed) + inline void set_speed_vec(const math::Vector2f &speed_vec) { - script_speed = speed; + script_speed_vec.assign(speed_vec); } /** @@ -387,8 +396,8 @@ private: /// particle radius vector: 0.0 - middle - 1.0 math::Vector3f script_radius_vec; - /// speed of ejected particles, in gameunits per second - float script_speed; + /// minimum and maximum speed of ejected particles, in gameunits per second + math::Vector2f script_speed_vec; /// acceleration of ejected particles, in gameunits per second squared float script_acceleration; /// spawn radius |