pause_particles.gd 402 B

1234567891011121314151617
  1. extends FutariParticles
  2. var speed_scale_local=1
  3. func _ready():
  4. speed_scale_local=self.get_speed_scale()
  5. func on_pause():
  6. if(get_tree().paused):
  7. #get_tree().connect("idle_frame", self, "_internal_process")
  8. speed_scale_local=self.get_speed_scale()
  9. self.set_speed_scale(0)
  10. else:
  11. #get_tree().disconnect("idle_frame", self, "_internal_process")
  12. self.set_speed_scale(speed_scale_local)
  13. pass