diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/particles_2d.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index b56f4f9ad9..572195b570 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -300,6 +300,15 @@ void Particles2D::_notification(int p_what) { #endif } + if (p_what == NOTIFICATION_PAUSED || p_what == NOTIFICATION_UNPAUSED) { + if (can_process()) { + VS::get_singleton()->particles_set_speed_scale(particles, speed_scale); + } else { + + VS::get_singleton()->particles_set_speed_scale(particles, 0); + } + } + if (p_what == NOTIFICATION_TRANSFORM_CHANGED) { _update_particle_emission_transform(); } |