diff options
author | Stijn Buys <ingar@osirion.org> | 2013-01-27 17:24:16 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-01-27 17:24:16 +0000 |
commit | f4eee214a79634cdd2e6fe576950524170c01fa9 (patch) | |
tree | c00f9685202c5c4ae502e2a632d341643e5b1ba8 /src/render/particleejectorscript.h | |
parent | fd6663f0d3a4e860c14a0f3279fcce06d27fa283 (diff) |
Support for particle ejector timeout value,
do not draw destroyed entity models.,
Diffstat (limited to 'src/render/particleejectorscript.h')
-rw-r--r-- | src/render/particleejectorscript.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/render/particleejectorscript.h b/src/render/particleejectorscript.h index 4ba8dea..535458e 100644 --- a/src/render/particleejectorscript.h +++ b/src/render/particleejectorscript.h @@ -51,6 +51,11 @@ public: return script_interval; } + inline const unsigned long timeout() const + { + return script_timeout; + } + /** * @brief angle of the cone through which to randomly spread ejected particles * */ @@ -300,6 +305,14 @@ public: } /** + * @brief set the time after which no more particles are ejected, in milliseconds + * */ + inline void set_timeout(const unsigned long timeout) + { + script_timeout = timeout; + } + + /** * @brief set particle lifespan, in milliseconds * */ inline void set_lifespan(const unsigned long lifespan) @@ -415,6 +428,8 @@ private: math::Axis script_axis; /// interval between to ejects, in milliseconds unsigned long script_interval; + /// time after which no more particles are ejected, in milliseconds + unsigned long script_timeout; /// lifespan of a particle, in milliseconds unsigned long script_lifespan; /// ejector cone, in default 360 degrees |