Commit a2e167aa authored by Florian Oetke's avatar Florian Oetke
Browse files

extended particle system to allow emitter reset

parent 3e190fff
...@@ -274,6 +274,14 @@ namespace mirrage::renderer { ...@@ -274,6 +274,14 @@ namespace mirrage::renderer {
void active(bool b) noexcept { _active = b; } void active(bool b) noexcept { _active = b; }
auto active() const noexcept { return _active; } auto active() const noexcept { return _active; }
void reset_time()
{
_time_accumulator = 0;
_spawn_idx = 0;
_spawn_entry_timer = 0;
_particles_to_spawn = 0;
_last_timestep = 0;
}
void position(glm::vec3 p) noexcept { _position = p; } void position(glm::vec3 p) noexcept { _position = p; }
auto position() const noexcept { return _position; } auto position() const noexcept { return _position; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment